Pointing models (ctapointing.pointingmodel)
Classes providing telescope pointing models and functionality to fit these models to pointing observations.
API
ctapointing.pointingmodel Package
- class ctapointing.pointingmodel.MechanicalModelHESS(**kwargs: Any)
The HESS standard pointing model.
- __init__(config=None, parent=None, **kwargs)
- Parameters:
config (traitlets.loader.Config) – Configuration specified by config file or cmdline arguments. Used to set traitlet values.
parent (Tool or Component) – If a Component is created by another Component or Tool, you need to pass the creating Component as parent, e.g. parent=self. This makes sure the config is correctly handed down to the child components. Do not pass config in this case.
kwargs – Traitlets to be overridden. TraitError is raised if kwargs contains a key that does not correspond to a traitlet.
- amp_non_perp_alt
amplitude of non-perpendicularity altitude axis
- amp_non_vert_az
amplitude of non-verticality azimuth axis
- amp_se_alt
amplitude of shaft encoder error altitude
- amp_se_az
amplitude of shaft encoder error azimuth
- amp_sin_2az
amplitude of sin(2az) effect
- bending_hor
horizontal camera bending
- bending_vert
vertical camera bending
- camera_offset_hor
horizontal camera offset
- camera_offset_vert
vertical camera offset
- camera_offset_vert_reverse
vertical camera offset (reverse)
- const_camera_rot
constant camera rotation
- const_focal_length
constant focal length
- const_refraction
constant refraction
- get_corrected_pointing(nominal_pointing)
Calculates the corrected pointing for a (array-like) sky coordinate in the AltAz system.
Implements the 19 parameters HESS mechanical pointing model.
- Parameters:
nominal_pointing (SkyCoord) – Nominal pointing of the telescope.
- Returns:
corrected_pointing – Corrected pointing of the telescope, according to the model predicition.
- Return type:
SkyCoord
- mix_sin_2az
mixing angle of sin(2az) effect
- offset_se_az
offset of shaft encoder azimuth
- phase_non_vert_az
phase of non-verticality azimuth axis
- phase_se_alt
phase of shaft encoder error altitude
- phase_se_az
phase of shaft encoder error azimuth
- phase_sin_2az
phase of sin(2az) effect
- class ctapointing.pointingmodel.NullModel(**kwargs: Any)
A pointing model without any corrections applied.
- __init__(config=None, parent=None, **kwargs)
- Parameters:
config (traitlets.loader.Config) – Configuration specified by config file or cmdline arguments. Used to set traitlet values.
parent (Tool or Component) – If a Component is created by another Component or Tool, you need to pass the creating Component as parent, e.g. parent=self. This makes sure the config is correctly handed down to the child components. Do not pass config in this case.
kwargs – Traitlets to be overridden. TraitError is raised if kwargs contains a key that does not correspond to a traitlet.
- get_corrected_pointing(nominal_pointing)
Calculates the corrected pointing for a single nominal pointing position.
In case of the NullModel, output is identical to input.
- Parameters:
nominal_pointing (SkyCoord) – Nominal pointing of the telescope.
- Returns:
corrected_pointing – Corrected pointing of the telescope, according to the model prediction.
- Return type:
SkyCoord
- class ctapointing.pointingmodel.PointingModel(**kwargs: Any)
Super class that holds the parameters of a pointing model, provides a function to calculate pointing corrections for a particular coordinate, and enables loading of a model from the database or a file.
- __init__(config=None, parent=None, **kwargs)
- Parameters:
config (traitlets.loader.Config) – Configuration specified by config file or cmdline arguments. Used to set traitlet values.
parent (Tool or Component) – If a Component is created by another Component or Tool, you need to pass the creating Component as parent, e.g. parent=self. This makes sure the config is correctly handed down to the child components. Do not pass config in this case.
kwargs – Traitlets to be overridden. TraitError is raised if kwargs contains a key that does not correspond to a traitlet.
- classmethod from_config(**kwargs)
Read a pointing model from either configuration file or database. Either the path of a configuration file (‘input_url’) or a database collection (‘collection’) must be provided.
- Parameters:
input_url (str or Path) – path of the configuration file.
name (str) – name of the camera (as in PointingCamera.name). When loading the configuration from file, can be set to check that the configuration with the correct name is loaded. When loading from database, is used to identify the correct database record.
uuid (str) – UUID of the camera (as in PointingCamera.uuid). When loading the configuration from file, can be set to check that the configuration with the correct UUID is loaded. When loading from database, is used to identify the correct database record.
collection (str) – name of the database collection from which configuration is read
database (str) – name of the database in which the collection is stored
- Returns:
camera
- Return type:
PointingCamera object
- get_corrected_pointing(nominal_pointing)
Calculates the corrected pointing for a single nominal pointing position. Must be implemented by child class.
- get_parameters_as_dict(strip_units=False) dict
Return a list of parameter values (with or without units)
- get_parameters_as_list(strip_units=False) list
Return a list of parameter values (with or without units)
- name
model name
- update_parameter_values(parameters: dict | list) None
Set a model or parts of a model from individual arguments or a dictionary
- Parameters:
parameters (dict) – dictionary of model parameters names (keys) and parameter values
- uuid
UUID of Pointing Model
- valid_from
start date of validity of model
- valid_until
end date of validity of model
- class ctapointing.pointingmodel.PointingModelFitterLid(**kwargs: Any)
Pointing model fitting class.
- distance_goal
fit distance goal
- fixed_parameters
list of parameters fixed during fitting
- classmethod from_config(**kwargs)
Read a PointingModelFitter configuration from either configuration file or database. Either the path of a configuration file (‘input_url’) or a database collection (‘collection’) must be provided.
- Parameters:
input_url (str or Path) – path of the configuration file.
name (str) – name of the SpotExtractor (as in SkyFitter.name). When loading the configuration from file, can be set to check that the configuration with the correct name is loaded. When loading from database, is used to identify the correct database record.
uuid (str) – UUID of the camera (as in PointingCamera.uuid). When loading the configuration from file, can be set to check that the configuration with the correct UUID is loaded. When loading from database, is used to identify the correct database record.
collection (str) – name of the database collection from which configuration is read
database (str) – name of the database in which the collection is stored
- Returns:
fitter
- Return type:
PointingModelFitter object or None
- max_num_fit_iterations
maximum number of fit iterations
- name
name of PointingModelFitter
- residual_cut
cut value for spot outlier removal
- uuid
UUID of PointingModelFitter
- class ctapointing.pointingmodel.PointingModelFitterSky(**kwargs: Any)
Pointing model fitting class.
- distance_goal
fit distance goal
- fixed_parameters
list of parameters fixed during fitting
- classmethod from_config(**kwargs)
Read a PointingModelFitter configuration from either configuration file or database. Either the path of a configuration file (‘input_url’) or a database collection (‘collection’) must be provided.
- Parameters:
input_url (str or Path) – path of the configuration file.
name (str) – name of the SpotExtractor (as in SkyFitter.name). When loading the configuration from file, can be set to check that the configuration with the correct name is loaded. When loading from database, is used to identify the correct database record.
uuid (str) – UUID of the camera (as in PointingCamera.uuid). When loading the configuration from file, can be set to check that the configuration with the correct UUID is loaded. When loading from database, is used to identify the correct database record.
collection (str) – name of the database collection from which configuration is read
database (str) – name of the database in which the collection is stored
- Returns:
fitter
- Return type:
PointingModelFitter object or None
- max_num_fit_iterations
maximum number of fit iterations
- name
name of PointingModelFitter
- residual_cut
cut value for spot outlier removal
- uuid
UUID of PointingModelFitter
- ctapointing.pointingmodel.plot_pointing_models(model_list, plot_difference=False, subtract_mean=False)
Plot the pointing corrections on the sky. model_list is a list of PointingModel objects. If plot_difference is True, the difference w.r.t. the first model is plotted.
returns references to the two figures.
Functions
|
Plot the pointing corrections on the sky. |
Classes
|
Super class that holds the parameters of a pointing model, provides a function to calculate pointing corrections for a particular coordinate, and enables loading of a model from the database or a file. |
|
A pointing model without any corrections applied. |
|
The HESS standard pointing model. |
|
Pointing model fitting class. |
|
Pointing model fitting class. |
Class Inheritance Diagram
