You are here: Home V2 Software Software More ... Developer Notes CcpNmr FormatConverter Adding New Measurements

Adding New Measurements

How to add new NMR measurements to FormatConverter code (Wim Vranken, 2008)

<component> is the information type that needs to be added.

This can be, for example, 'Shifts', 'T1Relaxation', ...


  1. Add the relevant read<component> or write<component> function to the IOkeywords dictionary (defined at the top). See 'readShifts' as an example.
  2. Also add the <component> to the 'subClasses' definitions for 'Measurements' in IOkeywords.
  3. Add the relevant read/write<component> function above the read/writeMeasurement function. See 'def readShifts' or 'def writeShifts' as example. Any keywords specific to the component should be added here as well. Here a <measurementType> is defined - for example 'shift'.
  4. Add the information relevant for the API and the ccp/format/ read/write function in setMeasurementCodes. See examples in there. The self.measurementType is defined in step 3.
  5. For reading only:
    1. Add a set<measurement>ListSpecific function. This handles specific info on the measurement list level. See setShiftListSpecific as example.
    2. Add a set<measurement>s function. This is the function that adds the measurements to the measurementList. See setShifts as example.
    3. Add a set<measurement>Specific function. This handles information in a way specific to a measurement. See setT1Specific as example.
    4. Add a create<measurement> function. This function creates the actual NMR measurement in CCPN. See createShift as example.


  1. In formatComponents, add the new component information, for example:      ['T1 relaxation','t1Relax']. The first value is the text that will show up in the FormatConverter GUI, the second the <measurementType>.
  2. Add the <measurementType> to the IoSetupList. See 'shifts' or 't1Relax' as example. This defines what appears in the FormatConverter GUI, as well as for which formats the I/O is valid. See documentation at start of IoSetupList for more info.
  3. Add the <measurementType> to the fileTypeDict. Again see 'shifts' or 't1Relax' as example.