gbm_drm_gen.utils package

Submodules

gbm_drm_gen.utils.contour_finder module

class gbm_drm_gen.utils.contour_finder.ContourFinder(healpix_map, nside=512)[source]

Bases: object

__init__(healpix_map, nside=512)[source]

modeled from giacomov

property map

Return the resized map

property nside

Return the nside of the re-sized map

property pixel_size

Return average side of pixel in degrees for the re-sized map

find_contour(containment_level=0.9)[source]

Return the indexes of the pixels in the map within the given containment level

get_sky_coordinates(indexes)[source]

gbm_drm_gen.utils.file_utils module

gbm_drm_gen.utils.file_utils.file_existing_and_readable(filename)[source]
gbm_drm_gen.utils.file_utils.path_exists_and_is_directory(path)[source]
gbm_drm_gen.utils.file_utils.sanitize_filename(filename, abspath=False)[source]
gbm_drm_gen.utils.file_utils.if_directory_not_existing_then_make(directory)[source]

If the given directory does not exists, then make it

Parameters

directory – directory to check or make

Returns

None

gbm_drm_gen.utils.file_utils.get_random_unique_name()[source]

Returns a name which is random and (with extremely high probability) unique

Returns

random file name

gbm_drm_gen.utils.file_utils.within_directory(directory)[source]

gbm_drm_gen.utils.general_utils module

class gbm_drm_gen.utils.general_utils.ThetaFormatterShiftPi(*a, **aa)[source]

Bases: matplotlib.projections.geo.GeoAxes.ThetaFormatter

Shifts labelling by pi Shifts labelling from -180,180 to 0-360

__init__(*a, **aa)[source]
extrapi = False
gbm_drm_gen.utils.general_utils.check_power_of_two(num)[source]

Check that the given number is a power of 2

gbm_drm_gen.utils.general_utils.pix_to_sky(idx, nside)[source]

Convert the pixels corresponding to the input indexes to sky coordinates (RA, Dec)

gbm_drm_gen.utils.general_utils.sky_to_pix(ra, dec, nside)[source]
gbm_drm_gen.utils.general_utils.theta_shifter(x)[source]

gbm_drm_gen.utils.geometry module

gbm_drm_gen.utils.geometry.ang2cart(ra, dec)[source]
Parameters
  • ra

  • dec

Returns

gbm_drm_gen.utils.geometry.get_ang(X1, X2)[source]
Parameters
  • X1

  • X2

Returns

gbm_drm_gen.utils.geometry.is_occulted(ra, dec, sc_pos)[source]
Parameters
  • ra

  • dec

  • sc_pos

Returns

gbm_drm_gen.utils.package_data module

gbm_drm_gen.utils.package_data.get_path_of_data_file(data_file)[source]
gbm_drm_gen.utils.package_data.get_path_of_data_dir()[source]
gbm_drm_gen.utils.package_data.copy_package_data(data_file)[source]

gbm_drm_gen.utils.response module

Module contents