Calibration manager
calib_manager object manages disk I/O for calibration data. It uses a directory tree to distinguish different data, and read/read/restore methods of the data objects.
Example of sub-directories dictionary
self._subdirs = dictionary({ $
phasescreen: 'phasescreens/', $ ; phase-screens
slopenull : 'slopenulls/', $ ; reference slope vector
pupils : 'pupils/', $ ; pyramid WFS pupil
subaps : 'subaps/', $ ; SH WFS sub-apertures index
rec : 'rec/', $ ; reconstruction matrix
im : 'im/', $ ; interaction matrix
ifunc : 'ifunc/', $ ; influence functions matrix (modal or zonal)
m2c : 'm2c/', $ ; modes-to-commands matrix
filter : 'filter/', $ ; IIR filters
pupilstop : 'pupilstop/', $ ; pupil mask
vibrations : 'vibrations/' $ ; vibrations PSD
})
Example of Read/Write methods
pro calib_manager::write_im, tag, intmat
; produces the filename with the complete path
filename = self.filename( 'im', tag, /makedirs)
intmat.tag = tag
; uses save method of the data object
intmat.save, filename
end
function calib_manager::read_im, tag
; produces the filename with the complete path
filename = self.filename( 'im', tag)
; returns !NULL if the file does not exist
if not file_test(filename) then return, !NULL
; uses restore method of the data object
return, intmat.restore(filename)
end
--
GuidoAgapito - 21 Aug 2018