ScienceCamera
- class ctapointing.camera.ScienceCamera(**kwargs: Any)
Bases:
ComponentCTA Science camera class.
Stores information about the focal plane of the camera, its distance from the mirror dish, and the position of pointing LEDs. Provides a method to transform sky coordinates into positions on the planar focal plane.
Attributes Summary
intensity of camera body (for simulations)
x coordinate of vertices defining body outer dimensions (for simulations, in camera frame)
y coordinate of vertices defining body outer dimensions (for simulations, in camera fram)
Return the centre of the camera in the ScienceCameraFrame
focal length of mirror dish
LED intensities (for simulations)
Return the camera LED positions in the ScienceCameraFrame
LED positions (x coordinate) in camera frame
LED positions (y coordinate) in camera frame
radius of the LED pinholes (for simulations)
intensity of camera lid (for simulations)
radius of circular camera lid
camera manufacturer
effective area of mirror dish
camera model
camera name
offset of camera centre w.r.t.
rotation of camera w.r.t.
Return a ScienceCameraFrame object, initialised from current camera (focal length, rotations, tilts etc.) properties.
camera tilt w.r.t.
UUID of Camera
Methods Summary
from_config(**kwargs)Read a camera configuration from either configuration file or database.
project_from(coords, obstime, telescope_pointing)Project given SkyCameraFrame coordinates back to AltAz.
project_into(coords[, telescope_pointing])Project a given array of altaz coordinates into the science camera frame.
Attributes Documentation
- body_intensity
intensity of camera body (for simulations)
- body_vertex_positions
- body_vertex_positions_x
x coordinate of vertices defining body outer dimensions (for simulations, in camera frame)
- body_vertex_positions_y
y coordinate of vertices defining body outer dimensions (for simulations, in camera fram)
- centre
Return the centre of the camera in the ScienceCameraFrame
- focal_length
focal length of mirror dish
- led_intensity
LED intensities (for simulations)
- led_positions
Return the camera LED positions in the ScienceCameraFrame
- led_positions_x
LED positions (x coordinate) in camera frame
- led_positions_y
LED positions (y coordinate) in camera frame
- led_radius
radius of the LED pinholes (for simulations)
- lid_intensity
intensity of camera lid (for simulations)
- lid_radius
radius of circular camera lid
- manufacturer
camera manufacturer
- mirror_area
effective area of mirror dish
- model
camera model
- name
camera name
- offset
offset of camera centre w.r.t. telescope orientation (x/y)
- rotation
rotation of camera w.r.t. horizon, in degrees
- sciencecameraframe
Return a ScienceCameraFrame object, initialised from current camera (focal length, rotations, tilts etc.) properties.
Can be used to transform from/to SciemceCameraFrame using up-to-date transformation parameters.
- tilt
camera tilt w.r.t. telescope orientation (x/y)
- uuid
UUID of Camera
Methods Documentation
- classmethod from_config(**kwargs)
Read a camera 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 camera (as in ScienceCamera.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 ScienceCamera.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:
ScienceCamera object
- project_from(coords, obstime, telescope_pointing)
Project given SkyCameraFrame coordinates back to AltAz.
- Parameters:
coords (SkyCoord in SkyCameraFrame) – coordinates on CCD chip in SkyCameraFrame
obstime (Astropy.Time) – time of the observation
telescope_pointing (SkyCoord) – telescope pointing direction
- Returns:
coords_altaz – transformed coordinates in the AltAz system
- Return type:
SkyCoord
- project_into(coords, telescope_pointing=None)
Project a given array of altaz coordinates into the science camera frame. Takes current camera orientation and tilts into account.
- Parameters:
coords (array(astropy.SkyCoord)) – array of sky coordinates in the AltAz system
telescope_pointing (astropy.SkyCoord) – telescope pointing position (RADec or AltAz system)
- Returns:
coords_proj (SkyCoord) – 2D projections in chip coordinates (in ScienceCameraFrame)
todo (star projection is wrong when translation t is switched on. This happens because)
the altaz position of the (infinitely) distant star is converted to a vector on the
unit circle. Should explicitly distinguish between star projection and projection of
world objects.
- __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.
- body_intensity
intensity of camera body (for simulations)
- body_vertex_positions_x
x coordinate of vertices defining body outer dimensions (for simulations, in camera frame)
- body_vertex_positions_y
y coordinate of vertices defining body outer dimensions (for simulations, in camera fram)
- property centre
Return the centre of the camera in the ScienceCameraFrame
- focal_length
focal length of mirror dish
- classmethod from_config(**kwargs)
Read a camera 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 camera (as in ScienceCamera.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 ScienceCamera.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:
ScienceCamera object
- led_intensity
LED intensities (for simulations)
- property led_positions
Return the camera LED positions in the ScienceCameraFrame
- led_positions_x
LED positions (x coordinate) in camera frame
- led_positions_y
LED positions (y coordinate) in camera frame
- led_radius
radius of the LED pinholes (for simulations)
- lid_intensity
intensity of camera lid (for simulations)
- lid_radius
radius of circular camera lid
- manufacturer
camera manufacturer
- mirror_area
effective area of mirror dish
- model
camera model
- name
camera name
- offset
offset of camera centre w.r.t. telescope orientation (x/y)
- project_from(coords, obstime, telescope_pointing)
Project given SkyCameraFrame coordinates back to AltAz.
- Parameters:
coords (SkyCoord in SkyCameraFrame) – coordinates on CCD chip in SkyCameraFrame
obstime (Astropy.Time) – time of the observation
telescope_pointing (SkyCoord) – telescope pointing direction
- Returns:
coords_altaz – transformed coordinates in the AltAz system
- Return type:
SkyCoord
- project_into(coords, telescope_pointing=None)
Project a given array of altaz coordinates into the science camera frame. Takes current camera orientation and tilts into account.
- Parameters:
coords (array(astropy.SkyCoord)) – array of sky coordinates in the AltAz system
telescope_pointing (astropy.SkyCoord) – telescope pointing position (RADec or AltAz system)
- Returns:
coords_proj (SkyCoord) – 2D projections in chip coordinates (in ScienceCameraFrame)
todo (star projection is wrong when translation t is switched on. This happens because)
the altaz position of the (infinitely) distant star is converted to a vector on the
unit circle. Should explicitly distinguish between star projection and projection of
world objects.
- rotation
rotation of camera w.r.t. horizon, in degrees
- property sciencecameraframe
Return a ScienceCameraFrame object, initialised from current camera (focal length, rotations, tilts etc.) properties.
Can be used to transform from/to SciemceCameraFrame using up-to-date transformation parameters.
- tilt
camera tilt w.r.t. telescope orientation (x/y)
- uuid
UUID of Camera