Utilities (~magicctapipe.utils)#

Reference/API#

magicctapipe.utils Package#

Functions#

reflected_camera_geometry_mars(camera_geom)

Reflect camera geometry (x->-y, y->-x)

identify_time_edges(times, criterion[, ...])

Identifies the time interval edges, corresponding to the True state of the specified condition.

intersect_time_intervals(intervals1, intervals2)

Intersects two lists of (TStart, TStop) pairs.

info_message(text[, prefix])

Prints the specified text with the prefix of the current date

calculate_disp(pointing_alt, pointing_az, ...)

Calculates the DISP parameter, i.e., the angular distance between the event arrival direction and the Center of Gravity (CoG) of the shower image.

calculate_impact(shower_alt, shower_az, ...)

Calculates the impact parameter, i.e., the closest distance between a shower axis and a telescope position.

calculate_mean_direction(lon, lat, unit[, ...])

Calculates the mean direction per shower event.

calculate_off_coordinates(pointing_ra, ...)

Calculates the coordinates of the centers of OFF regions to estimate the backgrounds for wobble observation data.

transform_altaz_to_radec(alt, az, obs_time)

Transforms the Alt/Az direction measured from ORM to the RA/Dec coordinate.

auto_MCP_parser([add_dates])

This is being used in many autoMCP scripts so it is extracted here.

auto_MCP_parse_config()

Most of the scripts just need to parse the config, this automatizes it.

load_merge_databases(config_dict)

Function to load and merge the twodatabases for joint observations

Classes#

MAGICBadPixelsCalc(is_simulation[, camera, ...])

Calculate bad pixels for MAGIC camera.

GTIGenerator([config, verbose])

Generate good time intervals (GTI).