gwin.calibration module¶
Functions for adding calibration factors to waveform templates.
-
class
gwin.calibration.
CubicSpline
(minimum_frequency, maximum_frequency, n_points, ifo_name)[source]¶ Bases:
gwin.calibration.Recalibrate
-
apply_calibration
(strain)[source]¶ Apply calibration model
This applies cubic spline calibration to the strain.
Parameters: strain (FrequencySeries) – The strain to be recalibrated. Returns: strain_adjusted – The recalibrated strain. Return type: FrequencySeries
-
name
= 'cubic_spline'¶
-
-
class
gwin.calibration.
Recalibrate
(ifo_name)[source]¶ Bases:
object
-
apply_calibration
(strain)[source]¶ Apply calibration model
This method should be overwritten by subclasses
Parameters: strain (FrequencySeries) – The strain to be recalibrated. Returns: strain_adjusted – The recalibrated strain. Return type: FrequencySeries
-
classmethod
from_config
(cp, ifo, section)[source]¶ Read a config file to get calibration options and transfer functions which will be used to intialize the model.
Parameters: - cp (WorkflowConfigParser) – An open config file.
- ifo (string) – The detector (H1, L1) for which the calibration model will be loaded.
- section (string) – The section name in the config file from which to retrieve the calibration options.
Returns: An instance of the class.
Return type: instance
-
map_to_adjust
(strain, prefix='recalib_', **params)[source]¶ Map an input dictionary of sampling parameters to the adjust_strain function by filtering the dictionary for the calibration parameters, then calling adjust_strain.
Parameters: Returns: strain_adjusted – The recalibrated strain.
Return type: FrequencySeries
-
name
= None¶
-