HIDE: Hydrogen (HI) Data Emulator

https://travis-ci.org/cosmo-ethz/hide.png?branch=master Documentation Status http://img.shields.io/badge/arXiv-1607.07443-orange.svg?style=flat

HIDE is a package for simulating of a single dish radio telescope survey. As such, it takes healpix maps as inputs and processes them into TOD. The design is flexible and can be customized to different instruments and survey designs.

Simulated time-ordered-data with **HIDE**.

The HIDE package has been developed at ETH Zurich in the Software Lab of the Cosmology Research Group of the ETH Institute of Astronomy.

The development is coordinated on GitHub and contributions are welcome. The documentation of HIDE is available at readthedocs.org .

Contents:

Installation

The project is hosted on GitHub. Get a copy by running:

$ git clone https://github.com/cosmo-ethz/hide.git

Install the package like this:

$ cd hide
$ pip install -r requirements.txt
$ python setup.py install --user

Alternatively, if you want to develop new features:

$ cd hide
$ python setup.py develop --user

Usage

To use Hydrogen (HI) Data Emulator in a project execute the following on the command line:

$ hide --strategy-start=2016-03-21-00:00:00 --strategy-end=2016-03-21-23:59:00 --verbose=True hide.config.bleien7m

This will simulate one day of time-ordered-data from the Bleien 7m radio telescope.

To visualize 15 minutes of the generated data run this:

import matplotlib.pyplot as plt
import matplotlib
import h5py

with h5py.File("./2016/03/21/TEST_MP_PXX_20160321_000000.h5", "r") as fp:
    tod = fp["P/Phase1"].value
    time = fp["TIME"].value

plt.imshow(tod, aspect="auto",
           extent=(time[0], time[-1],990, 1260),
           cmap="gist_earth", norm=matplotlib.colors.LogNorm())
plt.colorbar()
simulated Bleien 7m dish data

hide Package

hide Package

Subpackages

astro Package
gsm Module

Created on Feb 26, 2015

author: jakeret

hide.astro.gsm.load_signal(ctx)[source]

Returns an interpolated global sky model (GSM) map dependent on the frequency.

Parameters:params – The ctx instance with the paramterization
Returns signal:The astro signal
gsm_point_src Module

Created on Apr 22, 2016

In large parts a copy of astro_calibration_sources in seek by cchang.

Models taken from: Baars 1997, Hafez 2008, Benz 2009 All numbers divided by 2 to account for polarization.

Coordinates from wikipedia

author: seehars, jakeret

class hide.astro.gsm_point_src.AstroSource(model, ra, dec)

Bases: tuple

dec

Alias for field number 2

model

Alias for field number 0

ra

Alias for field number 1

hide.astro.gsm_point_src.add_point_sources(freq, nside, astro_signal, objects=None)[source]
hide.astro.gsm_point_src.barrs77_power_law(freq, a, b, c)[source]
hide.astro.gsm_point_src.cas_a_model(freq)[source]
hide.astro.gsm_point_src.convertunits(s, ae)[source]
hide.astro.gsm_point_src.cyg_a_model(freq)[source]
hide.astro.gsm_point_src.load_signal(ctx)[source]

Returns an interpolated global sky model (GSM) map dependent on the frequency and adds radio point srcs.

Parameters:params – The ctx instance with the paramterization
Returns signal:The astro signal
hide.astro.gsm_point_src.sag_a_model(freq)[source]
hide.astro.gsm_point_src.tau_a_model(freq)[source]
hide.astro.gsm_point_src.vir_a_model(freq)[source]
static Module

Created on Dec 8, 2014

author: jakeret

hide.astro.static.load_signal(ctx)[source]

Creates a sphere with a static flux as signal for the given ctx ( and params)

Parameters:params – The ctx instance with the paramterization
Returns signal:A static signal
static_gsm Module

Created on Jan 7, 2015

author: jakeret

hide.astro.static_gsm.load_signal(ctx)[source]

Returns the same global sky model (GSM) map independent of the frequency. Rescales the map if neccessary (if param.beam_nside != 512)

Parameters:params – The ctx instance with the paramterization
Returns signal:The astro signal
uniform Module

Created on Jan 7, 2015

author: jakeret

hide.astro.uniform.load_signal(ctx)[source]

Creates a sphere with a uniform flux as signal for the given ctx ( and params)

Parameters:params – The ctx instance with the paramterization
Returns signal:A static signal
beam Package
beam Package
hide.beam.AxisSpec

Beam definition

alias of axis

class hide.beam.BeamSpec(ra, dec, pixels)

Bases: tuple

dec

Alias for field number 1

pixels

Alias for field number 2

ra

Alias for field number 0

class hide.beam.ResponseSpec(pixel_idxs, ra, dec)

Bases: tuple

dec

Alias for field number 2

pixel_idxs

Alias for field number 0

ra

Alias for field number 1

airy Module

Created on Apr 25, 2016

author: jakeret

hide.beam.airy.airy_wrapper(fwhm)[source]
hide.beam.airy.bessel_j1(x)[source]
hide.beam.airy.load_beam_profile(beam_spec, frequencies, params)[source]

Creates a 2d airy beam profile using the given gain template

Parameters:params – The params instance with the paramterization
Returns profile:
 A list of callable beam profiles
hide.beam.airy.normalization(fwhm, nside)[source]
hide.beam.airy.sigma2fwhm(sigma)[source]
airy_disk Module

Created on Apr 25, 2016

author: jakeret

hide.beam.airy_disk.load_beam_profile(beam_spec, frequencies, params)[source]

Creates a 2d airy disk beam profile for the given params definition

Parameters:params – The params instance with the paramterization
Returns profile:
 A list of callable beam profiles
gaussian Module

Created on Dec 8, 2014

author: jakeret

hide.beam.gaussian.gauss_wrapper(sigma, beam_response)[source]
hide.beam.gaussian.load_beam_profile(beam_spec, frequencies, params)[source]

Creates a 2d gaussian beam profile for the given params definition

Parameters:params – The params instance with the paramterization
Returns profile:
 A list of callable beam profiles
hide.beam.gaussian.normalization(sigma, nside)[source]
gaussian_interp Module

Created on Dec 8, 2014

author: jakeret

hide.beam.gaussian_interp.load_beam_profile(beam_spec, frequencies, params)[source]

Creates a tophat beam profile for the given params definition

Parameters:params – The params instance with the paramterization
Returns profile:
 The top hat profile
hide.beam.gaussian_interp.normalization(sigma, nside)[source]
hide.beam.gaussian_interp.spline(func, beam_response)[source]
top_hat Module

Created on Dec 8, 2014

author: jakeret

hide.beam.top_hat.load_beam_profile(beam_spec, frequencies, params)[source]

Creates a tophat beam profile for the given params definition

Parameters:params – The params instance with the paramterization
Returns profile:
 The top hat profile
hide.beam.top_hat.normalization(r, nside)[source]
config Package
bleien Module

Created on Dec 8, 2014

author: jakeret

bleien7m Module

Created on Nov 9, 2015

author: jakeret

common Module

Created on Dec 8, 2014

author: jakeret

earth Package
constant Module

Created on Nov 25, 2015

author: jakeret

hide.earth.constant.load_signal(ctx)[source]

Returns a constant signal

Parameters:ctx – context object containing params
Returns earth_signal:
 healpy map with the signal
horizon Module

Created on Dec 8, 2014

author: jakeret

hide.earth.horizon.load_signal(ctx)[source]

Models effect of the horizon

Parameters:ctx – context object containing params
Returns earth_signal:
 healpy map with the signal
plugins Package
add_background Module

Created on Mar 23, 2016

author: seehars

class hide.plugins.add_background.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Adds a time-constant, elevation dependent background to the TOD.

add_point_sources Module

Created on Apr 22, 2016

author: seehars

class hide.plugins.add_point_sources.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

add_reference Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.add_reference.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

add_rfi Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.add_rfi.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Adds RFI to the time ordered data

hide.plugins.add_rfi.gaussian(height, center_x, center_y, width_x, width_y)[source]

Returns a gaussian function with the given parameters

add_rfi_phaseswitch Module

Created on Feb 17, 2016

author: seehars

class hide.plugins.add_rfi_phaseswitch.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Adds RFI to the time ordered data (phase switch).

getTime()[source]
hide.plugins.add_rfi_phaseswitch.calcRFI(background, amplitude, fraction, deltat, deltaf, exponent, enhance, nf, nt)[source]

Get time-frequency plane of RFI.

Parameters:
  • background – background level of data per channel
  • amplitude – maximal amplitude of RFI per channel
  • fraction – fraction of RFI dominated pixels per channel
  • deltat – time scale of rfi decay (in units of pixels)
  • deltaf – frequency scale of rfi decay (in units of pixels)
  • exponent – exponent of rfi model (either 1 or 2)
  • enhance – enhancement factor relative to fraction
  • nf – number of frequency channels
  • nt – number of time steps
Returns RFI:

time-frequency plane of RFI

hide.plugins.add_rfi_phaseswitch.getDayNightMask(rfiday, time)[source]
hide.plugins.add_rfi_phaseswitch.getRFI(background, amplitude, fraction, deltat, deltaf, exponent, enhance, frequencies, time, rfiday, damping)[source]

Get time-frequency plane of RFI.

Parameters:
  • background – background level of data per channel
  • amplitude – maximal amplitude of RFI per channel
  • fraction – fraction of RFI dominated pixels per channel
  • deltat – time scale of rfi decay (in units of pixels)
  • deltaf – frequency scale of rfi decay (in units of pixels)
  • exponent – exponent of rfi model (either 1 or 2)
  • enhance – enhancement factor relative to fraction
  • frequencies – frequencies of tod in MHz
  • time – time of day in hours of tod
  • rfiday – tuple of start and end of RFI day
  • damping – damping factor for RFI fraction during the RFI night
Returns RFI:

time-frequency plane of RFI

hide.plugins.add_rfi_phaseswitch.kernel(deltaf, deltat, nf, nt, N, exponent)[source]

Convolution kernel for FFT convolution

Parameters:
  • deltaf – spread of RFI model in frequency
  • deltat – spread of RFI model in time
  • nf – number of frequencies
  • nt – number of time steps
  • N – size of kernel relative to deltaf, deltat
  • exponent – exponent of RFI model (see logmodel)
Returns kernel:

convolution kernel

hide.plugins.add_rfi_phaseswitch.logmodel(x, dx, exponent)[source]
Model for the log of the RFI profile:
  • -abs(x)/dx for exponent 1
  • -(x/dx)^2 for exponent 2
Parameters:
  • x – grid on which to evaluate the profile
  • dx – width of exponential
  • exponent – exponent of (x/dx), either 1 or 2
Returns logmodel:
 

log of RFI profile

apply_gain Module

Created on Feb 27, 2015

author: jakeret

class hide.plugins.apply_gain.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Transform the temperature based (Kelvin) TOD into ADU by applying a spectrometer specific gain

astro_signal Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.astro_signal.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

background_noise Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.background_noise.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Adds background noise to the time ordered data

hide.plugins.background_noise.get_noise(scale, alpha, beta, size)[source]
clean_up Module

Created on Sep 14, 2015

author: jakeret

class hide.plugins.clean_up.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Cleans up the context to avoid a memory leak

combine_signals Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.combine_signals.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Combines the different signals by convolving the beam profile with the input signals

coord_transform Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.coord_transform.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Applies the coordination transformation to the beam profile by rotating the beam response on the sky sphere according to the defined scanning strategy

hide.plugins.coord_transform.plot_beam(beam_spec, coord_ra, coord_dec, rphis, rthetas, ras, decs)[source]
earth_signal Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.earth_signal.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

initialize Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.initialize.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Initialize ..,

load_beam_profile Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.load_beam_profile.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Delegates the loading process to the beam profile provider

map_frequency_plugin Module

Created on Dec 11, 2014

author: jakeret

class hide.plugins.map_frequency_plugin.Plugin(ctx)[source]

Bases: object

Maps the frequencies to the plugin collection.

getWorkload()[source]
map_strategy_plugin Module

Created on Dec 11, 2014

author: jakeret

class hide.plugins.map_strategy_plugin.Plugin(ctx)[source]

Bases: object

Maps the strategy coordinates to the plugin collection.

getWorkload()[source]
qu_opt_coord_transform Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.qu_opt_coord_transform.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Applies the coordination transformation to the beam profile by rotating the beam response on the sky sphere according to the defined scanning strategy

reduce_frequency_plugin Module

Created on Mar 18, 2014

author: jakeret

class hide.plugins.reduce_frequency_plugin.Plugin(ctx)[source]

Bases: object

Combines the time ordered data for all frequencies

reduce(ctxList)[source]
reduce_signals_plugin Module

Created on Mar 18, 2014

author: jakeret

class hide.plugins.reduce_signals_plugin.Plugin(ctx)[source]

Bases: object

Combines all signals to time ordered data

reduce(ctxList)[source]
scanning_strategy Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.scanning_strategy.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

write_calibration Module

Created on Mar 29, 2016

author: seehars

class hide.plugins.write_calibration.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Writes the sources of the calibration days to disk

hide.plugins.write_calibration.get_header()[source]

Get header for calibration day file

hide.plugins.write_calibration.get_path(path, date, name)[source]

Get path for calibration day

Parameters:
  • path – output_path
  • date – key of calibration day
  • name – name of calibration file
hide.plugins.write_calibration.write_day(date, entries, path, name, header)[source]

Write calibration day to file

Parameters:
  • date – key to calibration day
  • entries – list of sources
  • path – output_path
  • name – name of calibaration file
  • header – header information
write_coords Module

Created on Sep 4, 2015

author: jakeret

class hide.plugins.write_coords.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Writes the time ordered data to the file system

write_rfi Module

Created on Feb 25, 2016

author: seehars

class hide.plugins.write_rfi.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Writes the RFI contribution to the time ordered phase switch data to the file system. Works only after tod is written to disk.

hide.plugins.write_rfi.write_data(ctx, rfi_key, rfi_name)[source]
write_tod Module

Created on Dec 8, 2014

author: jakeret

class hide.plugins.write_tod.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

DEPRECATED: Writes the time ordered data to the file system

write_tod_fits Module

Created on Sep 4, 2015

author: jakeret

class hide.plugins.write_tod_fits.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Writes the time ordered data to the file system in a fits file

write_tod_phaseswitch Module

Created on Dec 16, 2015

author: seehars

class hide.plugins.write_tod_phaseswitch.Plugin(ctx, **kwargs)[source]

Bases: ivy.plugin.base_plugin.BasePlugin

Writes the time ordered phase switch data to the file system

hide.plugins.write_tod_phaseswitch.add_dataset(grp, name, data)[source]

Adds a dataset to the group applying moderate compression

Parameters:
  • grp – The group
  • name – Name of the dataset
  • data – the actual data to be added
hide.plugins.write_tod_phaseswitch.get_path(ctx, pol)[source]

Get path for output :param ctx: instance of ivy context :param pol: identifier for polarization

hide.plugins.write_tod_phaseswitch.write_data(ctx, tod_key, Pname, P2name=None)[source]

Write the phase switch data to disk.

Parameters:
  • ctx – instance of ivy context
  • tod_key – key for the data to write
  • Pname – group name for TOD
  • P2name – group name for kurtosis data (None at the moment)
spectrometer Package
M9703A Module

Created on Nov 9, 2015

author: jakeret

hide.spectrometer.M9703A.convert_frequencies(frequencies)[source]

Convert frequencies to internal frequencies of M9703A :param frequencies: true frequencies :returns freq: internal frequencies

hide.spectrometer.M9703A.get_background(frequencies, el_model)[source]
hide.spectrometer.M9703A.get_gain(frequencies)[source]
hide.spectrometer.M9703A.get_noise_params(frequencies)[source]
hide.spectrometer.M9703A.get_rfi_params(frequencies)[source]
hide.spectrometer.M9703A.get_schedule()[source]
callisto Module

Created on Nov 9, 2015

author: jakeret

hide.spectrometer.callisto.apply_background(ctx)[source]
hide.spectrometer.callisto.apply_gain(ctx)[source]

Logaritmizes the data, adds an fix offset and finally applies a model of a standing wave to the TOD :param ctx:

hide.spectrometer.callisto.get_sw(frequencies, ft_model, fmin, fmax, nf, slope)[source]
strategy Package
strategy Package
class hide.strategy.CoordSpec(time, alt, az, ra, dec)

Bases: tuple

alt

Alias for field number 1

az

Alias for field number 2

dec

Alias for field number 4

ra

Alias for field number 3

time

Alias for field number 0

center Module

Created on Dec 9, 2014

author: jakeret

hide.strategy.center.load_strategy(ctx)[source]

Creates a dummy scanning strategy by always centering on RA/DEC 0/0

Parameters:ctx – The ctx instance with the paramterization
Returns strategy:
 A dummy scanning strategy
crosshair Module

Created on Jan 7, 2015

author: jakeret

hide.strategy.crosshair.load_strategy(ctx)[source]

Creates a crosshair in RA/DEC scanning strategy

Parameters:ctx – The ctx instance with the parameterization
Returns strategy:
 A crosshair scanning strategy
drift_scan Module

Created on Jan 15, 2015

author: jakeret

hide.strategy.drift_scan.load_strategy(ctx)[source]

Creates a scanning strategy that uses drift mode i.e. the telescope stares at the same position for 24 hours and then changes the altiude by a certain angle

Parameters:ctx – The ctx instance with the paramterization
Returns strategy:
 A list of CoordSpec with the scanning strategy
full_sky Module

Created on Jan 15, 2015

author: jakeret

hide.strategy.full_sky.load_strategy(ctx)[source]

Creates a scanning strategy that covers the full sky

Parameters:ctx – The ctx instance with the paramterization
Returns strategy:
 A list of CoordSpec with the scanning strategy for the full sky
scheduler Module

Created on Mar 24, 2016

author: seehars

class hide.strategy.scheduler.ScheduleEntry(date, az, el, mode)[source]

Bases: object

day()[source]
delta(other)[source]
is_survey()[source]
hide.strategy.scheduler.load_strategy(ctx)[source]

Creates a scanning strategy from a scheduler file.

Parameters:ctx – The ctx instance with the path to the scheduler file
Returns strategy:
 A list of CoordSpec with the scanning strategy
hide.strategy.scheduler.parse_schedule(path, strategy_start)[source]

Parses a scheduler file :param path: the path to the scheduler file :param strategy_start: start date of the strategy

Returns schedule_entries:
 list of ScheduleEntry
hide.strategy.scheduler.process_schedule(schedule, step_size, strategy_start, strategy_end, obs)[source]

Processes a list of schedule entries :param schedule: the list of schedule entries :param step_size: the step size to use :param strategy_start: start date of the strategy :param strategy_end: end date of the strategy :param obs: telescope position

Returns strategy, calibration_days:
 a list of CoordSpec and a dict for the calibration days
scheduler_virtual Module

Created on May 4, 2016

author: jakeret

hide.strategy.scheduler_virtual.load_strategy(ctx)[source]

Creates a scanning strategy from a scheduler file.

Parameters:ctx – The ctx instance with the path to the scheduler file
Returns strategy:
 A list of CoordSpec with the scanning strategy
hide.strategy.scheduler_virtual.replace_calibrations(schedule, obs)[source]
utils Package
utils Package

Created on Feb 20, 2015

author: jakeret

hide.utils.arccos(x)[source]
hide.utils.parse_datetime(s)[source]
hide.utils.sin_cos(x)[source]
quaternion Module
class hide.utils.quaternion.Rotator(q)[source]

Bases: object

Quaternion based rotator implementation for theta, phi

class hide.utils.quaternion.VecRotator(q)[source]

Bases: object

Quaternion based rotator implementation for theta, phi

hide.utils.quaternion.inv(q)[source]

Inverse of quaternion array q

hide.utils.quaternion.mult(p, q)[source]

Multiply arrays of quaternions, ndarray objects with 4 columns defined as x y z w see: http://en.wikipedia.org/wiki/Quaternions#Quaternions_and_the_geometry_of_R3

hide.utils.quaternion.norm(q)[source]

Normalize quaternion array q to unit quaternions

hide.utils.quaternion.power(q, t)[source]

raise quaternion to the power of t

hide.utils.quaternion.rotate_vec(q, v)[source]

Rotate or array of vectors v by quaternion q

hide.utils.quaternion.rotate_vec_opt(q, v)[source]

Rotate or array of vectors v by quaternion q

hide.utils.quaternion.rotate_vec_slow(q, v)[source]

Rotate or array of vectors v by quaternion q

hide.utils.quaternion.slerp(q, r, t)[source]

spherical linear interpolation between q and r by t

hide.utils.quaternion.toAxisAngle(q)[source]
hide.utils.quaternion.vecquad(x, y, z, w)[source]

create a quaternion from a euler vector with angle

signal Module

Created on Nov 10, 2015

author: jakeret

hide.utils.signal.noisegen(beta=0, N=8192)[source]

Noise will be generated that has spectral densities that vary as powers of inverse frequency, more precisely, the power spectra P(f) is proportional to 1 / fbeta for beta >= 0. When beta is 0 the noise is referred to white noise, when it is 2 it is referred to as Brownian noise, and when it is 1 it normally referred to simply as 1/f noise which occurs very often in processes found in nature.

The basic method involves creating frequency components which have a magnitude that is generated from a Gaussian white process and scaled by the appropriate power of f. The phase is uniformly distributed on 0, 2pi.

from http://paulbourke.net/fractals/noise/

Parameters:
  • beta
  • N – number of samples (can also be shape of array)
Returns out:

the sampled noise

sphere Module

Created on Dec 22, 2014

author: jakeret

class hide.utils.sphere.ArcKDTree(theta, phi)[source]

Bases: object

Wraps the scipy.spatial.cKDTree such that the tree can be used with spherical coords

query(theta, phi, k=1, eps=0, p=2, distance_upper_bound=inf)[source]

Query the kd-tree for nearest neighbors using theta, phi :param theta: :param phi: :param k: :param eps: :param p: :param distance_upper_bound:

Returns d, i:The distances to the nearest neighbors, the locations of the neighbors in self.data.
query_ball_point(theta, phi, r, eps=0)[source]
hide.utils.sphere.altaz_to_ra_dec(date, az, alt, obs=None, ctx=None)[source]
hide.utils.sphere.dec2theta(dec)[source]
hide.utils.sphere.dir2vec(theta, phi)[source]

converts angle to vector

hide.utils.sphere.get_observer(ctx)[source]
hide.utils.sphere.phi2ra(phi)[source]
hide.utils.sphere.ra2phi(ra)[source]
hide.utils.sphere.radec_to_altaz(date, ra, dec, obs=None, ctx=None)[source]
hide.utils.sphere.rotate_map(Map, rotator, mask=None)[source]

Map is map in system A rotator is rotator from system B to A mask is a mask in system B returns new map in system B

hide.utils.sphere.separation(d1, a1, d2, a2)[source]

great circle distance http://en.wikipedia.org/wiki/Great-circle_distance#Computational_formulas

Parameters:
  • d1 – dec 1
  • a1 – ra 1
  • d2 – dec 2

:param a2:ra 2

hide.utils.sphere.theta2dec(theta)[source]
hide.utils.sphere.vec2dir(vec)[source]

converts vector to angles

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your local setup that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.
Fix Bugs
Implement Features
Write Documentation

Hydrogen (HI) Data Emulator could always use more documentation, whether as part of the official Hydrogen (HI) Data Emulator docs, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback

If you are proposing a feature:

  • Explain in detail how it would work.
  • Keep the scope as narrow as possible, to make it easier to implement.
  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.
  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
  3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. make sure that the tests pass for all supported Python versions.

Tips

To run a subset of tests:

$ py.test test/test_hide.py

Credits

Development Lead

Contributors

None yet. Why not be the first?

History

0.1.0 (2016-07-20)

  • Publication

Feedback

If you have any suggestions or questions about Hydrogen (HI) Data Emulator feel free to email me at jakeret@phys.ethz.ch.

If you encounter any errors or problems with Hydrogen (HI) Data Emulator, please let me know!