fact.instrument package

fact.instrument.get_pixel_coords()[source]

Calculate the pixel coordinates from the standard pixel-map file by default it gets rotated by 90 degrees clockwise to show the same orientation as MARS and fact-tools

fact.instrument.get_pixel_dataframe[source]

return pixel mapping as pd.DataFrame

fact.instrument.camera_distance_mm_to_deg(distance_mm)[source]

Transform a distance in mm in the camera plane to it’s approximate equivalent in degrees.

Submodules

fact.instrument.constants module

Constants describing the FACT telescope

fact.instrument.constants.ALTITUDE_ASL_M = 2200

FACT’s altitude above sea level in meters

fact.instrument.constants.FOCAL_LENGTH_MM = 4889

FACT’s reflector focal length in mm.

fact.instrument.constants.FOV_PER_PIXEL_DEG = 0.11133355166864294

Field of view of a single pixel in decimal degrees

fact.instrument.constants.LATITUDE_DEC_DEG = 28.7616

FACT’s latitude in decimal degrees

fact.instrument.constants.LONGITUDE_DEC_DEG = -17.8911

FACT’s longitude in decimal degrees

fact.instrument.constants.PINCUSHION_DISTORTION_SLOPE = 0.020666666666666667

The segmented imaging reflector of FACT is well described using the thin lens equation. However, the most prominent deviation from the thin lens, is the imaging reflectors pincushin distortion. The pincushin distortion projects incomning light further away from the optical axis as it is expected from the thin lens equation. The additional outward pin-cushin distortion gets stronger the further the distance to the optical axis is.

actual_projection_angle = (1 + PINCUSHION_DISTORTION_SLOPE) * thin_lens_prediction_angle

Example: According to the tĥin lens model one expects incoming light of 1.5 deg incident angle relative to the optical axis to be projected in:

tan(1.5deg)*focal_length = 128.02mm

distance to the optical axis on the image sensor screen. But the reflector actually projects this incoming light further to the outside to:

128.02mm * (1 + PINCUSHION_DISTORTION_SLOPE) = 130.67mm

As one can see, the correction is minor. It is only half a pixel at the outer rim of the field of view.

_images/pincushin_distortion_slope.png
fact.instrument.constants.PIXEL_SPACING_IN_MM = 9.5

The inner diameter of the hexagonal pixels in mm. This is also the grid constant of the hex grid.

fact.instrument.camera module

fact.instrument.camera.bias_to_trigger_patch_map[source]
fact.instrument.camera.camera_distance_mm_to_deg(distance_mm)[source]

Transform a distance in mm in the camera plane to it’s approximate equivalent in degrees.

fact.instrument.camera.chid2softid(chid)[source]
fact.instrument.camera.combine_bias_patch_current_to_trigger_patch_current(bias_patch_currents)[source]

For this to work, you need to know that the calibrated currents in FACT which are delivered by the program FEEDBACK for all 320 bias patches are given as “uA per pixel per bias patch”, not as “uA per bias patch” So if you want to combine these currents into one value given as: “uA per trigger patch” or “uA per pixel per trigger patch”, you need to know the number of pixels in a bias patch.

Luckily this is given by our patch_indices() DataFrame

fact.instrument.camera.get_pixel_coords()[source]

Calculate the pixel coordinates from the standard pixel-map file by default it gets rotated by 90 degrees clockwise to show the same orientation as MARS and fact-tools

fact.instrument.camera.get_pixel_dataframe[source]

return pixel mapping as pd.DataFrame

fact.instrument.camera.hardid2chid(hardid)[source]
fact.instrument.camera.hardid2softid(hardid)[source]
fact.instrument.camera.reorder_softid2chid(array)[source]

Returns view to the given array, remapped from softid order to chid order (e.g. MARS ordering to fact-tools ordering)

fact.instrument.camera.softid2chid(softid)[source]
fact.instrument.camera.softid2hardid(softid)[source]
fact.instrument.camera.take_apart_trigger_values_for_bias_patches(trigger_rates)[source]

Assumption is you have 160 values from trigger patches, such as the trigger rates per patch, or the trigger threshold per patch or whatever else you cant find per patch.

And for some reason you say: Well this is valid for the entire trigger patch really, but I believe it also correlates with the bias patch