wiki:RadialCalDetails

As of June 2017 there is a need to add radial calibration capabilities to the UltraScan? data formats and software. Radial calibration enables a radial offset in centimeters to be determined and to be added to the initial import radius values associated with readings in a raw AUC data set.

The general strategy for determining the radial offset of an instrument is as follows.

  • Choose a rotor used on the instrument.
  • Choose a rotor calibration for that rotor.
  • Select a radial calibration speed.
  • Using the rotor calibration coefficients (coeff1, coeff2) and the selected speed (rpm), compute:
    radial_offset = coeff1 * rpm  +  coeff2 * rpm^2   ;
    

The general strategy for utilising the radial offset of an instrument in the course of analysis is as follows.

  • Upon import of data (us_convert), the instrument used in the run is determined; and any radial_offset thus determined.
  • If the import files are other than AUC files and radial_offset is non-zero, the offset is added to all radial values.
  • If the import files are AUC files, radial_offset is non-zero, and the AUC's are flagged as not having applied the offset yet; then the offset is added to all radial values.
  • The AUC files written to the results directory and reflected in the RawData table of the database may be different that any AUC imported from an imports directory.
  • All subsequent analysis need pay no attention to radial_offset, since radial values will have been updated.

These strategies require changes throughout the desktop and LIMS software. The details of those changes follow.

  1. A new "radialCalibration" table.
    • Columns in the new table are:
      • radialCalID [ int(11) autoincrement ]
      • radialCalGUID [ char(36) unique ]
      • speed [ int(11) default='0' ]
      • rotorCalID [ int(11) default='0' ] *dateUpdated [ timestamp default=now() ]
  1. Change to the "instrument" table of all databases.
    • The current instrument table contains these fields:
      • instrumentID
      • labID
      • name
      • serialNumber
      • dateUpdated
    • One new column needs to be added:
      • radialCalID [ int(11) default='0' ]
  1. Change to "get_instrument_info" stored procedure.
    • Currently returns:
      • name ( value[ 0 ] )
      • serialNumber ( value[ 1 ] )
    • Needs to also return:
      • labID ( value[ 2 ] )
      • dateUpdated ( value[ 3 ] )
      • radialCalID ( value[ 4 ] )
      • speed ( value[ 5 ] )
      • rotorCalID ( value[ 6 ] )
      • coeff1 ( value[ 7 ] )
      • coeff2 ( value[ 8 ] )
  1. A new "update_instrument" stored procedure.
    • Updates an instrument record matching an input instrumentID with this new column value:
      • radialCalID
  1. A new "add_radialcal" stored procedure.
    • Creates a new radialCalibration table entry.
    • Takes as arguments:
      • radialCalGUID
      • speed
      • rotorCalID
    • Automatically sets column values for:
      • radialCalID
      • dateUpdated
  1. A new "get_radialcal_info" stored procedure.
    • Takes radialCalID or ("0" for "all") argument.
    • Returns:
      • radialCalID ( value[ 0 ] )
      • radialCalGUID ( value[ 1 ] )
      • speed ( value[ 2 ] )
      • rotorCalID ( value[ 3 ] )
      • dateUpdated ( value[ 4 ] )
      • coeff1 ( value[ 5 ] )
      • coeff2 ( value[ 6 ] )
  1. Change to ~/ultrascan/data/rotors/labs.xml .
    • Add radialOffset, radialCalID to local XML's lab.instruments and to internal structures.
  1. New ~/ultrascan/data/rotors/radialCals.xml file .
    • Each entry for a radial calibration has the fields
      • id [ radial calibration db Id ]
      • guid [ 36-character radial calibration global Id ]
      • offset [ radial offset ]
      • speed [ radial calibration speed ]
      • rotorCalId [ rotor calibration db Id ]
      • time [ datetime of DB radialCalibration record creation ]
      • coeff1 [ coefficient 1 from rotor calibration ]
      • coeff2 [ coefficient 2 from rotor calibration ]
    • As an example:
                <radialCal id="1" guid="a06a2795-99bd-67b4-ad90-401eb5f560fd" 
                  offset="0.000582" speed="5000" rotorCalId="12"
                  time="2017-06-12 10:44" coeff1="8.10372e-08" coeff2="7.07769e-12"/>
      
    • The local "radialCals.xml" file is updated whenever the database "radialCalibration" table is updated.
  1. Add new Manage Instruments application.
    • The main purpose of this new application is the ability to compute a radial offset for each instrument.
    • Would have full add/edit/delete functionality.
    • For a selected/newly-named Instrument in a Lab,
      • has present name and serialNumber entries;
      • allows selection of rotor and rotor calibration;
      • then entry of radial calibration speed,
      • results in determination of radial offset;
      • and save of radialCalibration record.
  1. Changes to US_Rotor class.
    • A new US_Rotor::RadialCal class.
      • Includes parameters: ID, GUID, offset, speed, rotorCalID, time, coeff1, coeff2.
      • Includes direct methods:
              Status readDB( const int radcId, US_DB2* db );
              Status readDisk( const in radcId );
        
    • Mods to US_Rotor class add new static methods:
            Status readRadialCalibrations( QVector< US_Rotor::RadialCal >& radcals, const int instrID, US_DB2* dbP );
            Status syncRadialCalsToDisk(  QVector< US_Rotor::RadialCal >& radcals );
      
  1. Changes to US_DataIO and US_DataIO::RawData classes.
    • Present US_DataIO is version "5".
    • A new version "6" would be created.
    • The US_DataIO::RawData class has new variables
           bool    offs_appl;     //!< Radius offset has been applied
           double  rad_offset;    //!< Offset applied to radius values (+ve.)
           int     radc_ID;       //!< Radial calibration database ID
      
    • New variables are mostly for maintaining history.
    • Radius values will all have had any offset added and will be used as they are (in all subsequent analysis steps).
    • A RawData object can be converted from an "imports" version to a "results" version via RawData method:
       US_DataIO::RawData::apply_rad_offset( const double roffset );
      
    • AUC imports-to-results conversion may result in no changes if the imports "offs_appl" variable exists and is "true".
    • During import from non-AUC files, a radial offset may be applied if the associated instrument has a non-zero offset.
    • A binary AUC record of version 6 and beyond has 12 bytes more than version 5 or less, between the old description and the min_radius value:
      • C4 "ROFA" if radial offset has been applied;
      • F4 radial offset;
      • I4 radial calibration database ID.
  1. Persistence of calibrations.
    • Neither rotorCalibration nor radialCalibration records should ever be deleted.
    • In this way, old AUC records will maintain historical information related to determination of a radial offset.
    • When a new radialCalibration is linked to an instrument record, a new radialCalibration is created, but the one previously linked to the instrument is retained.
    • For old AUC, radialCalibration info. is accessible via RawData class variable "radc_ID".
Last modified 17 months ago Last modified on Jun 25, 2017 4:05:02 PM