plugins Package

background_removal Module

calibration Module

Created on Feb 4, 2016

author: cchang

class seek.plugins.calibration.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

This class is used to specify which calibration type to use. If the case “data” is specified, derive gain curve from separate module in calibration directory.

create_maps Module

Created on Feb 26, 2016

author: jakeret

class seek.plugins.create_maps.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

This class fills the map pixels by delegating the computation to the ‘map_maker’.

class seek.plugins.create_maps.RestructuredTODStore(paths)[source]

Bases: object

This class restructures all the ‘chunks’ of data so that all the data points associated with the same healpix pixel is collected together.

get(idx)[source]

find_nested_files Module

Created on Jul 27, 2015

author: jakeret

class seek.plugins.find_nested_files.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Traverses the file system from the file_prefix and collects all data and coord paths within the scanning strategy start and end date

seek.plugins.find_nested_files.get_calibration_path(path, date)[source]

Get path for calibration file.

Parameters:
  • path – path for the data files
  • date – date corresponding to the files
  • prefix – file prefix
Returns:

full path to calibration file

seek.plugins.find_nested_files.get_coords_path(path, date, prefix)[source]

Get path for coordinate file.

Parameters:
  • path – path for the data files
  • date – date corresponding to the files
  • prefix – file prefix
Returns:

full path to coordinate file

seek.plugins.find_nested_files.is_calibration_day(path, date)[source]

Determine whether the date is a calibration day.

Parameters:
  • path – path where files are stored
  • date – date corresponding to the files
  • prefix – file prefix
Returns:

TRUE or FALSE

seek.plugins.find_nested_files.is_skiped(path, date, prefix)[source]

Determine whether the date is skipped.

Parameters:
  • path – path where files are stored
  • date – date corresponding to the files
  • prefix – file prefix
Returns:

TRUE or FALSE

initialize Module

load_data Module

Created on Jul 28, 2015

author: jakeret

class seek.plugins.load_data.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Loads the data from files, applies cuts in frequency direction and also integrates the data in time and freq

class seek.plugins.load_data.TimeOrderedData(strategy_start, frequencies, time_axis, vx, vy, ref_channel)

Bases: tuple

frequencies

Alias for field number 1

ref_channel

Alias for field number 5

strategy_start

Alias for field number 0

time_axis

Alias for field number 2

vx

Alias for field number 3

vy

Alias for field number 4

seek.plugins.load_data.convert_callisto(data)[source]

Converts the digits into kelvins

Parameters:
  • frequencies – the frequencies of the data
  • data – array containing the data [freq, time]
Returns data:

the converted data

seek.plugins.load_data.convert_to_radio_frequency(frequencies, spectrometer)[source]

Conversion between internal frequency and the actual physical frequency

Parameters:
  • IF – internal frequency array
  • ctx – context object
Returns RF:

converted frequency array

seek.plugins.load_data.get_observation_start(path, file_type)[source]

Extracts the observation date

Parameters:path – path to the file
Returns observation_start:
 datetime object with the date
seek.plugins.load_data.get_observation_start_from_fits(path)[source]

Extracts the observation date

Parameters:path – path to the file
Returns observation_start:
 datetime object with the date
seek.plugins.load_data.get_observation_start_from_hdf5(path)[source]

Extracts the observation date

Parameters:path – path to the file
Returns observation_start:
 datetime object with the date
seek.plugins.load_data.load_tod(file_paths, ctx)[source]

Load the time ordered data from the given file paths :param file_paths: list of absolute file paths pointing to the data files :param ctx: Context object with the configuration

Returns TimeOrderedData:
 returns a TimeOrderedData namedtupel

load_preprocessed_data Module

Created on Jan 15, 2016

author: jakeret

class seek.plugins.load_preprocessed_data.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Loads the data, mask and frequencies of the current iteration from disk. Can be used for closer analysis of the masking (sum threshold). The data is read from the current folder using the same filename as the first input filename.

make_maps Module

Created on Jan 5, 2015

author: seehars

class seek.plugins.make_maps.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Make map from restructured TOD based on the specified map_maker.

map_file_paths Module

Created on Feb 3, 2015

author: jakeret

class seek.plugins.map_file_paths.Plugin(ctx)[source]

Bases: object

Maps the file paths to the plugin collection.

getWorkload()[source]
seek.plugins.map_file_paths.chunk(iterable, n)[source]

map_indicies Module

Created on Mar 7, 2016

author: jakeret

class seek.plugins.map_indicies.Plugin(ctx)[source]

Bases: object

Maps the file paths to the plugin collection.

getWorkload()[source]
seek.plugins.map_indicies.chunk(iterable, n)[source]

mask_artefacts Module

Created on Jun 6, 2016

author: jakeret

class seek.plugins.mask_artefacts.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

First masks given frequency ranges that are known to be RFI-contaminatedm. Next masks artefacts based on a custom file in the data directory.

mask_artefacts()[source]

Mask artefacts.

Returns:mask after specified artefacts are masked.
mask_frequencies()[source]

Mask bad frequency channels.

Returns:mask after specified frequencies are masked.

mask_objects Module

Created on Feb 6, 2015

author: jakeret

class seek.plugins.mask_objects.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Masks the Sun and the Moon using ephem.

mask_objects()[source]
seek.plugins.mask_objects.get_object_separation(obs, start_date, time, ra, dec)[source]

Get separation between the Sun/Moon and the RA/DEC of a pixel.

Parameters:
  • obs – pyephem observer
  • start_date – date
  • time – time axis of TOD
  • ra – RA for TOD
  • dec – DEC for TOD
Returns:

separation of the TOD positions with the Sun and the Moon

post_process_tod Module

Created on Feb 6, 2015

author: jakeret

class seek.plugins.post_process_tod.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Writes the data, mask and frequencies of the current iteration to disk. Can be used for closer analysis of the masking (sum threshold). Output is written to the current folder using the same filename as the first input filename (may overwrite the original file if not being careful)

pre_process_tod Module

Created on Jan 20, 2016

author: jakeret

class seek.plugins.pre_process_tod.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Converts the TOD’s depending on the spectrometer

seek.plugins.pre_process_tod.apply_gain(frequencies, data, gain_file)[source]

Converts the digits into kelvins using a gain template

Parameters:
  • frequencies – the frequencies of the data
  • data – array containing the data [freq, time]
Returns data:

the converted data

process_coords Module

Created on Jul 28, 2015

author: jakeret

class seek.plugins.process_coords.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Loads the telescope coordinate file for the current observation date and converts AZ/EL to RA/DEC.

seek.plugins.process_coords.convert_coords(date, time_steps, azs, els, obs)[source]

Convert the time/az/ele coordinates to RA/DEC.

Parameters:
  • date – date
  • time_steps – time interval between two TOD pixels
  • azs – Azimuth coordinate
  • els – Elevation coordinate
  • obs – pyephem observer
Returns:

RA/DEC array corresponding to TOD

reduce_map_indicies Module

Created on Feb 26, 2016

author: jakeret

class seek.plugins.reduce_map_indicies.Plugin(ctx)[source]

Bases: object

Reduces the restructured TODs constructed per chunk to one.

reduce(ctxList)[source]

reduce_maps Module

remove_RFI Module

Created on Jan 5, 2015

author: seehars

class seek.plugins.remove_RFI.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Call the specified RFI mitigation module.

restructure_tod Module

write_maps Module

Created on Jan 5, 2015

author: seehars

class seek.plugins.write_maps.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Writes map and associated information to HDF5 files.