Core modules

Localisation runner

arts_localisation.run_localisation.main()
arts_localisation.run_localisation.make_plot(conf_ints, X, Y, title, conf_int, mode='radec', sigma_max=3, freq=<Quantity 1370. MHz>, t_arr=None, loc=None, cb_pos=None, src_pos=None)

Create plot of localisation area

Parameters:
  • conf_ints – confidence interval grid

  • X – RA or Az

  • Y – Dec or Alt

  • title – plot title

  • conf_int – confidence interval to plot

  • mode – radec or altaz (default radec)

  • sigma_max – used to determine maximum value for colors in plot (default 3)

  • freq – central frequency (default 1370 MHz)

  • t_arr – burst arrival time (only required if mode is altaz)

  • loc – legend location (optional)

  • cb_pos – cb pointing (optional, tuple or list of tuples)

  • src_pos – source position (tuple)

Returns:

figure

arts_localisation.run_localisation.nested_dict_values(d)

Get all values from a nested dictionary

Parameters:

d (dict) – dictionary

Returns:

generator for values

S/N determination

arts_localisation.calc_snr.get_burst_window(burst, **config)

Load a single SB and determine the arrival time of a burst within window_load and window_zoom of the centre, as well as the boxcar width corresponding to the highest S/N

Parameters:
  • burst (str) – Name of the burst key in the config

  • config – S/N configuration

Returns:

startbin_wide, chunksize_wide, startbin_small, chunksize_small, boxcar_width (all int)

arts_localisation.calc_snr.main()

Config parser

arts_localisation.config_parser.load_config(args, for_snr=False)

Load yaml config file and overwrite settings that are also given on command line

Parameters:
  • args (argparse.Namespace) – Command line arguments

  • for_snr (bool) – Only load settings related to S/N determination, skip everything else

Returns:

config (dict)

arts_localisation.config_parser.parse_yaml(fname, for_snr=False)

Parse a yaml file with settings for burst localisation

Parameters:
  • fname (str) – Path to yaml config file

  • for_snr (bool) – Load settings for S/N determination, else load localisation settings

Returns:

config (dict)

Tools

arts_localisation.tools.altaz_to_hadec(alt, az, lat=<Latitude 52.91532992 deg>)

Convert Alt, Az to HA, Dec

Parameters:
  • alt – altitude with unit

  • az – azimuth with unit

  • lat – Latitude with unit (default: WSRT)

Returns:

hour angle, declination

arts_localisation.tools.cb_index_to_pointing(cb, pointing_ra, pointing_dec)

Get pointing of given CB based on telescope pointing. Assumes reference_beam = 0, i.e. the telescope pointing coincides with the phase center of CB00

Parameters:
  • cb (int/list) – CB index

  • pointing_ra (Quantity) – Pointing right ascension

  • pointing_dec (Quantity) – Pointing Declination

Returns:

(RA, Dec) tuple of CB pointing, with unit

arts_localisation.tools.coord_to_offset(ra0, dec0, ra1, dec1)

Convert point (ra1, dec1) to projected offset from reference (ra0, dec0)

Parameters:
  • ra0 – Reference RA or Az

  • dec0 – Reference Dec or Alt

  • ra1 – Target RA or Az

  • dec1 – Target Dec or Alt

Returns:

(theta, phi) offset

theta is offset in RA or Az

phi is offset in Dec or Alt

arts_localisation.tools.get_neighbours(cbs)

Get neighbouring CBs of given CB(s)

Parameters:

cbs (int/list) – CB(s) to get neighbours for

Returns:

flattened list of neighbours

arts_localisation.tools.hadec_to_altaz(ha, dec, lat=<Latitude 52.91532992 deg>)

Convert HA, Dec to Alt, Az

Parameters:
  • ha – hour angle with unit

  • dec – declination with unit

  • lat – Latitude with unit (default: WSRT)

Returns:

altitude, azimuth

arts_localisation.tools.hadec_to_par(ha, dec, lat=<Latitude 52.91532992 deg>)

Convert HA, Dec to parallactic angle

Parameters:
  • ha – hour angle with unit

  • dec – declination with unit

  • lat – Latitude with unit (default: WSRT)

Returns:

parallactic angle

arts_localisation.tools.hadec_to_proj(ha, dec, lat=<Latitude 52.91532992 deg>)

Convert HA, Dec to E-W baseline projection angle

Parameters:
  • ha – hour angle with unit

  • dec – declination with unit

  • lat – Latitude with unit (default: WSRT)

Returns:

projection angle

arts_localisation.tools.hadec_to_radec(ha, dec, t, lon=<Longitude 6.60894465 deg>)

Convert apparent HA, Dec to J2000 RA, Dec

Parameters:
  • ha – hour angle with unit

  • dec – declination with unit

  • t – UT time (string or astropy.time.Time)

  • lon – Longitude with unit (default: WSRT)

Returns:

SkyCoord object of J2000 coordinates

arts_localisation.tools.limit(val, minval=-1, maxval=1)

Where val > maxval, replace by maxval

Where val < minval, replace by minval

Parameters:
  • val – input value

  • minval – minimum value

  • maxval – maximum value

Returns:

limited value

arts_localisation.tools.makedirs(path)

Mimic os.makedirs, but do not error when directory already exists

Parameters:

path (str) – path to recursively create

arts_localisation.tools.offset_to_coord(ra0, dec0, theta, phi)

Convert a projected offset (theta, phi) to coordinate with reference (ra0, dec0)

Parameters:
  • ra0 – Reference RA or Az

  • dec0 – Reference Dec or Alt

  • theta – RA or Az offset

  • phi – Dec or Alt offset

Returns:

(Ra, Dec) or (Az, Alt) of offset point

arts_localisation.tools.radec_to_hadec(ra, dec, t, lon=<Longitude 6.60894465 deg>)

Convert J2000 RA, Dec to apparent HA, Dec

Parameters:
  • ra – right ascension with unit

  • dec – declination with unit

  • t – UT time (string or astropy.time.Time)

  • lon – Longitude with unit (default: WSRT)

Returns:

HA, Dec with unit

arts_localisation.tools.rotate_coordinate_grid(X, Y, angle, origin=None)

Rotate input coordinate grid by given angle around given origin (default: center)

Parameters:
  • X – input x coordinates

  • Y – input y coordinates

  • angle – rotation angle

  • origin – tuple with origin for rotation (default: center of XY grid)

Returns:

rotated X, Y

Constants

arts_localisation.constants.ARRAY_ITRF = <Quantity [3828630.63486201,  443593.39226634, 5064922.99755   ] m>

ITRF WSRT reference position

arts_localisation.constants.BANDWIDTH = <Quantity 300. MHz>

Bandwidth

arts_localisation.constants.CB_HPBW = <Quantity 28.0835088 arcmin>

CB half-power width

arts_localisation.constants.CB_MODEL_FILE = 'beam_models_190607.csv'

Path to fitted CB model parameters

arts_localisation.constants.CB_OFFSETS = 'square_39p1.cb_offsets'

File with definition of CB offsets

arts_localisation.constants.DISH_POS_ITRF = <Quantity [[3828729.99081359,  442735.17696417, 5064923.00829   ],            [3828713.43109885,  442878.2118934 , 5064923.00436   ],            [3828696.86994428,  443021.24917264, 5064923.00397   ],            [3828680.31391933,  443164.28596862, 5064923.00035   ],            [3828663.75159173,  443307.32138056, 5064923.00204   ],            [3828647.19342757,  443450.35604638, 5064923.0023    ],            [3828630.63486201,  443593.39226634, 5064922.99755   ],            [3828614.07606798,  443736.42941621, 5064923.        ],            [3828609.94224429,  443772.19450029, 5064922.99868   ],            [3828603.73202612,  443825.83321168, 5064922.99963   ],            [3828460.92418735,  445059.52053929, 5064922.99071   ],            [3828452.64716351,  445131.03744105, 5064922.98793   ]] m>

ITRF positions of RT2 - RTD in maxi-short setup

arts_localisation.constants.DISH_SIZE = <Quantity 25. m>

Dish diameter

arts_localisation.constants.NCB = 40

Number of compound beams

arts_localisation.constants.NSB = 71

Number of synthesised beams

arts_localisation.constants.NTAB = 12

Number of tied-array beams

arts_localisation.constants.REF_FREQ = <Quantity 1770. MHz>

Reference frequency for CB half-power width