tools¶
This module contanins assorted helper functions for the calibration of specMACS data.
-
runmacs.spec.calibration.tools.
classifyFrames
(header)[source]¶ Performs simple frame classification.
This method operates solely by generating slices at the points im time as marked by the entries in the action log.
Parameters: header – ENVI header to be classified as dict
Returns: The (same,) header with added frame classificatoin data. Note: This function operates in-place Note: The runmacs.spec.classification.frameclassification
module offers a more sophisticated analysis.
-
runmacs.spec.calibration.tools.
normalizeEnviHeader
(header)[source]¶ Normalizes an ENVI header across various versions of the specMACS ENVI header formats.
Parameters: header – ENVI header to be normalized as dict
Returns: The (same,) normalized header Note: This function operates in-place
-
runmacs.spec.calibration.tools.
parseActionLog
(loglist)[source]¶ Parses action log from a action log list.
Parameters: loglist – The action log as list of tuples. Returns: The action log as list of tuples with time as datetime objects.
-
runmacs.spec.calibration.tools.
parseIsoTime
(time)[source]¶ Parses iso time format
Parameters: time – Time to parse as string. Returns: Time as datetime
-
runmacs.spec.calibration.tools.
parseIsoTimeSlow
(time)[source]¶ Parses iso time format
Parameters: time – Time to parse as string. Returns: Time as datetime Note: This should cope all valid ISO time formats, but is intended only as fallback for parseIsoTime()
.