New measurements
How to add new measurements.
<component> is the information type that needs to be added.
This can be, for example, 'Shifts', 'T1Relaxation', ...
In DataFormat.py:
- Add the relevant read<component> or write<component> function to the IOkeywords dictionary (defined at the top). See 'readShifts' as an example.
- Also add the <component> to the 'subClasses' definitions for 'Measurements' in IOkeywords.
- Add the relevant DataFormat.py 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'.
- 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.
- For reading only:
- Add a set<measurement>ListSpecific function. This handles specific info on the measurement list level. See setShiftListSpecific as example.
- Add a set<measurement>s function. This is the function that adds the measurements to the measurementList. See setShifts as example.
- Add a set<measurement>Specific function. This handles information in a way specific to a measurement. See setT1Specific as example.
- Add a create<measurement> function. This function creates the actual NMR measurement in CCPN. See createShift as example.
In Constants.py:
- 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>.
- 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.
- Add the <measurementType> to the fileTypeDict. Again see 'shifts' or 't1Relax' as example.