SkyModel Class

SkyModel is the main user class. It is a container for point source and diffuse models that can be interacted with directly and it provides import and export functionality.

class pyradiosky.SkyModel(name=None, ra=None, dec=None, stokes=None, spectral_type=None, freq_array=None, reference_frequency=None, spectral_index=None, component_type=None, nside=None, hpx_inds=None, stokes_error=None, extended_model_group=None, beam_amp=None, history='')[source]

Object to hold point source and diffuse models.

Defines a set of components at given ICRS ra/dec coordinates, with flux densities defined by stokes parameters.

Flux densities defined are by stokes parameters. The attribute Ncomponents gives the number of source components.

Contains methods to:
  • Read and write different catalog formats.

  • Calculate source positions.

  • Calculate local coherency matrix in a local topocentric frame.

Parameters
  • name (array_like of str) – Unique identifier for each source component, shape (Ncomponents,). Not used if nside is set.

  • ra (astropy.Longitude) – source RA in J2000 (or ICRS) coordinates, shape (Ncomponents,).

  • dec (astropy.Latitude) – source Dec in J2000 (or ICRS) coordinates, shape (Ncomponents,).

  • stokes (astropy.Quantity or array_like of float (Deprecated)) – The source flux, shape (4, Nfreqs, Ncomponents). The first axis indexes the polarization as [I, Q, U, V].

  • spectral_type (str) – Indicates how fluxes should be calculated at each frequency.

    Options:

    • ‘flat’ : Flat spectrum.

    • ‘full’ : Flux is defined by a saved value at each frequency.

    • ‘subband’ : Flux is given at a set of band centers.

    • ‘spectral_index’ : Flux is given at a reference frequency.

  • freq_array (astropy.Quantity) – Array of frequencies that fluxes are provided for, shape (Nfreqs,).

  • reference_frequency (astropy.Quantity) – Reference frequencies of flux values, shape (Ncomponents,).

  • spectral_index (array_like of float) – Spectral index of each source, shape (Ncomponents). None if spectral_type is not ‘spectral_index’.

  • component_type (str) – Component type, either ‘point’ or ‘healpix’. If this is not set, the type is inferred from whether nside is set.

  • nside (int) – nside parameter for HEALPix maps.

  • hpx_inds (array_like of int) – Indices for HEALPix maps, only used if nside is set.

  • extended_model_group (array_like of str) – Identifier that groups components of an extended source model. Empty string for point sources, shape (Ncomponents,).

  • beam_amp (array_like of float) – Beam amplitude at the source position, shape (4, Nfreqs, Ncomponents). 4 element vector corresponds to [XX, YY, XY, YX] instrumental polarizations.

  • history (str) – History to add to object.

set_spectral_type_params(spectral_type)[source]

Set parameters depending on spectral_type.

Deprecated, use _set_spectral_type_params

clear_time_position_specific_params()[source]

Set parameters which are time & position specific to None.

check(check_extra=True, run_check_acceptability=True)[source]

Check that all required parameters are set reasonably.

Check that required parameters exist and have appropriate shapes. Optionally check if the values are acceptable.

Parameters
  • check_extra (bool) – Option to check optional parameters as well as required ones.

  • run_check_acceptability (bool) – Option to check if values in required parameters are acceptable.

kelvin_to_jansky()[source]

Apply a conversion to stokes from K-based units to Jy-based units.

No conversion is applied if stokes is already compatible with Jy (for point component_type) or Jy/sr (for healpix component_type).

jansky_to_kelvin()[source]

Apply a conversion to stokes from Jy-based units to K-based units.

No conversion is applied if stokes is already compatible with K sr (for point component_type) or K (for healpix component_type).

healpix_to_point(to_jy=True, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Convert a healpix component_type object to a point component_type.

Multiply by the pixel area and optionally convert to Jy. This effectively treats diffuse pixels as unresolved point sources by integrating over the pixel area. Whether or not this is a good assumption depends on the nside and the resolution of the telescope, so it should be used with care, but it is provided here as a convenience.

Parameters
  • to_jy (bool) – Option to convert to Jy compatible units.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

point_to_healpix(to_k=True, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Convert a point component_type object to a healpix component_type.

Requires that the hpx_inds and nside parameters are set on the object. Divide by the pixel area and optionally convert to K. This method is provided as a convenience for users to be able to undo the healpix_to_point method.

Parameters
  • to_k (bool) – Option to convert to K compatible units.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

at_frequencies(freqs, inplace=True, freq_interp_kind='cubic', run_check=True, atol=None)[source]

Evaluate the stokes array at the specified frequencies.

Produces a SkyModel object that is in the full frequency spectral type, based on the current spectral type: - full: Extract a subset of existing frequencies. - subband: Interpolate to new frequencies. - spectral_index: Evaluate at the new frequencies. - flat: Copy to new frequencies.

Parameters
  • freqs (Quantity) – Frequencies at which Stokes parameters will be evaluated.

  • inplace (bool) – If True, modify the current SkyModel object. Otherwise, returns a new instance. Default True.

  • freq_interp_kind (str or int) – Spline interpolation order, as can be understood by scipy.interpolate.interp1d. Defaults to ‘cubic’

  • run_check (bool) – Run check on new SkyModel. Default True.

  • atol (Quantity) – Tolerance for frequency comparison. Defaults to 1 Hz.

update_positions(time, telescope_location)[source]

Calculate the altitude/azimuth positions for source components.

From alt/az, calculate direction cosines (lmn)

Doesn’t return anything but updates the following attributes in-place: * pos_lmn * alt_az * time

Parameters
  • time (astropy.Time) – Time to update positions for.

  • telescope_location (astropy.EarthLocation) – Telescope location to update positions for.

coherency_calc(deprecated_location=None)[source]

Calculate the local coherency in alt/az basis.

SkyModel.update_positions() must be run prior to this method.

The coherency is a 2x2 matrix giving electric field correlation in Jy. It’s specified on the object as a coherency in the ra/dec basis, but must be rotated into local alt/az.

Parameters

deprecated_location (astropy.EarthLocation) – This keyword is deprecated. It is preserved to maintain backwards compatibility and sets the EarthLocation on this SkyModel object.

Returns

array of float – local coherency in alt/az basis, shape (2, 2, Nfreqs, Ncomponents)

concat(other, clear_time_position=True, verbose_history=False, inplace=True, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Combine two SkyModel objects along source axis.

Parameters
  • other (SkyModel object) – Another SkyModel object which will be concatenated with self.

  • inplace (bool) – If True, overwrite self as we go, otherwise create a third object as the sum of the two.

  • clear_time_position (bool) – Option to clear time and position dependent parameters on both objects before concatenation. If False, time and position dependent parameters must match on both objects.

  • verbose_history (bool) – Option to allow more verbose history. If True and if the histories for the two objects are different, the combined object will keep all the history of both input objects (if many objects are combined in succession this can lead to very long histories). If False and if the histories for the two objects are different, the combined object will have the history of the first object and only the parts of the second object history that are unique (this is done word by word and can result in hard to interpret histories).

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after combining objects.

  • check_extra (bool) – Option to check optional parameters as well as required ones.

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after combining objects.

Raises

ValueError – If other is not a SkyModel object, self and other are not compatible or if data in self and other overlap. One way they can not be compatible is if they have different spectral_types.

select(component_inds=None, inplace=True, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Downselect data to keep on the object along various axes.

Currently this only supports downselecting based on the component axis, but this will be expanded to support other axes as well.

The history attribute on the object will be updated to identify the operations performed.

Parameters
  • component_inds (array_like of int) – Component indices to keep on the object.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

  • inplace (bool) – Option to perform the select directly on self or return a new SkyModel object with just the selected data (the default is True, meaning the select will be done on self).

source_cuts(latitude_deg=None, horizon_buffer=0.04364, min_flux=None, max_flux=None, freq_range=None, run_check=True, check_extra=True, run_check_acceptability=True, inplace=True)[source]

Perform flux and horizon selections.

Parameters
  • latitude_deg (float) – Latitude of telescope in degrees. Used to estimate rise/set lst.

  • horizon_buffer (float) – Angle buffer for coarse horizon cut in radians. Default is about 10 minutes of sky rotation. Components whose calculated altitude is less than horizon_buffer are excluded. Caution! The altitude calculation does not account for precession/nutation of the Earth. The buffer angle is needed to ensure that the horizon cut doesn’t exclude sources near but above the horizon. Since the cutoff is done using lst, and the lsts are calculated with astropy, the required buffer should _not_ drift with time since the J2000 epoch. The default buffer has been tested around julian date 2457458.0.

  • min_flux (Quantity or float) – Minimum stokes I flux to select on. If not a Quantity, assumed to be in Jy.

  • max_flux (Quantity or float) – Maximum stokes I flux to select. If not a Quantity, assumed to be in Jy.

  • freq_range (astropy.Quantity) – Frequency range over which the min and max flux tests should be performed. Must be length 2. If None, use the range over which the object is defined.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

  • inplace (bool) – Option to do the cuts on the object in place or to return a copy with the cuts applied.

to_recarray()[source]

Make a recarray of source components from this object.

Returns

catalog_table (recarray) – recarray equivalent to SkyModel data.

Notes

This stores all SkyModel data in a contiguous array that can be more easily handled with numpy.

classmethod from_recarray(recarray_in, history='', run_check=True, check_extra=True, run_check_acceptability=True)[source]

Initialize this object from a recarray.

Parameters
  • recarray_in (recarray) – recarray to turn into a SkyModel object.

  • history (str) – History to add to object.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

read_skyh5(filename, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Read a skyh5 file (our flavor of hdf5) into this object.

Parameters
  • filename (str) – Path and name of the skyh5 file to read.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

classmethod from_skyh5(filename, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Create a new SkyModel from skyh5 file (our flavor of hdf5).

Parameters
  • filename (str) – Path and name of the skyh5 file to read.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

read_healpix_hdf5(hdf5_filename, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Read hdf5 healpix files into this object.

Deprecated. Support for this file format will be removed in version 0.3.0. Use read_skyh5 to read our newer skyh5 file type.

Parameters
  • hdf5_filename (str) – Path and name of the hdf5 file to read.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

Notes

Currently, this function only converts a HEALPix map with a frequency axis.

classmethod from_healpix_hdf5(hdf5_filename, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Create a new SkyModel from a hdf5 healpix file.

Deprecated. Support for this file format will be removed in version 0.3.0. Use from_skyh5 to create a new SkyModel from our newer skyh5 file type.

Parameters
  • hdf5_filename (str) – Path and name of the hdf5 file to read.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

Notes

Currently, this function only converts a HEALPix map with a frequency axis.

read_votable_catalog(votable_file, table_name, id_column, ra_column, dec_column, flux_columns, reference_frequency=None, freq_array=None, spectral_index_column=None, flux_error_columns=None, source_select_kwds=None, history='', run_check=True, check_extra=True, run_check_acceptability=True)[source]

Read a votable catalog file into this object.

This reader uses the units in the file, the units should be specified following the VOTable conventions.

Parameters
  • votable_file (str) – Path to votable catalog file.

  • table_name (str) – Part of expected table name. Should match only one table name in votable_file.

  • id_column (str) – Part of expected ID column. Should match only one column in the table.

  • ra_column (str) – Part of expected RA column. Should match only one column in the table.

  • dec_column (str) – Part of expected Dec column. Should match only one column in the table.

  • flux_columns (str or list of str) – Part of expected Flux column(s). Each one should match only one column in the table.

  • reference_frequency (astropy.Quantity) – Reference frequency for flux values, assumed to be the same value for all rows.

  • freq_array (astropy.Quantity) – Frequencies corresponding to flux_columns (should be same length). Required for multiple flux columns.

  • spectral_index_column (str) – Part of expected spectral index column. Should match only one column in the table.

  • flux_error_columns (str or list of str) – Part of expected Flux error column(s). Each one should match only one column in the table.

  • return_table (bool, optional) – Whether to return the astropy table instead of a list of Source objects.

  • source_select_kwds (dict, optional) – Dictionary of keywords for source selection Valid options:

    • lst_array: For coarse RA horizon cuts, lsts used in the simulation [radians]

    • latitude_deg: Latitude of telescope in degrees. Used for declination coarse

      horizon cut.

    • horizon_buffer: Angle (float, in radians) of buffer for coarse horizon cut. Default is about 10 minutes of sky rotation. (See caveats in source_cuts() docstring)

    • min_flux: Minimum stokes I flux to select [Jy]

    • max_flux: Maximum stokes I flux to select [Jy]

  • history (str) – History to add to object.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

classmethod from_votable_catalog(votable_file, *args, **kwargs)[source]

Create a SkyModel from a votable catalog.

Parameters

kwargs – All parameters are sent through to read_votable_catalog().

Returns

sky_model (SkyModel) – The object instantiated using the votable catalog.

read_gleam_catalog(gleam_file, spectral_type='subband', source_select_kwds=None, with_error=False, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Read the GLEAM votable catalog file into this object.

Tested on: GLEAM EGC catalog, version 2

Parameters
  • gleam_file (str) – Path to GLEAM votable catalog file.

  • spectral_type (str) – One of ‘flat’, ‘subband’ or ‘spectral_index’. If set to ‘flat’, the wide band integrated flux will be used, if set to ‘spectral_index’ the fitted flux at 200 MHz will be used for the flux column.

  • source_select_kwds (dict, optional) – Dictionary of keywords for source selection Valid options:

    • lst_array: For coarse RA horizon cuts, lsts used in the simulation [radians]

    • latitude_deg: Latitude of telescope in degrees. Used for declination coarse

      horizon cut.

    • horizon_buffer: Angle (float, in radians) of buffer for coarse horizon cut. Default is about 10 minutes of sky rotation. (See caveats in array_to_skymodel() docstring)

    • min_flux: Minimum stokes I flux to select [Jy]

    • max_flux: Maximum stokes I flux to select [Jy]

  • with_error (bool) – Option to include the errors on the stokes array on the object in the stokes_error parameter. Note that the values assigned to this parameter are the flux fitting errors. The GLEAM paper (Hurley-Walker et al., 2019) specifies that flux scale errors should be added in quadrature to these fitting errors, but that the size of the flux scale errors depends on whether the comparison is between GLEAM sub-bands or with another catalog. Between GLEAM sub-bands, the flux scale error is 2-3% of the component flux (depending on declination), while flux scale errors between GLEAM and other catalogs is 8-80% of the component flux (depending on declination).

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

classmethod from_gleam_catalog(gleam_file, **kwargs)[source]

Create a SkyModel from a GLEAM catalog.

Parameters

kwargs – All parameters are sent through to read_gleam_catalog().

Returns

sky_model (SkyModel) – The object instantiated using the GLEAM catalog.

read_text_catalog(catalog_csv, source_select_kwds=None, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Read a text file of sources into this object.

Parameters
  • catalog_csv (str) – Path to tab separated value file with the following required columns: * Source_ID: source name as a string of maximum 10 characters * ra_j2000: right ascension at J2000 epoch, in decimal degrees * dec_j2000: declination at J2000 epoch, in decimal degrees * Flux [Jy]: Stokes I flux density in Janskys

    If flux is specified at multiple frequencies (must be the same set for all components), the frequencies must be included in each column name, e.g. Flux at 150 MHz [Jy]. Recognized units are (‘Hz’, ‘kHz’, ‘MHz’ or ‘GHz’):

    If flux is only specified at one reference frequency (can be different per component), a frequency column should be added (note: assumed to be in Hz): * Frequency: reference frequency [Hz]

    Optionally a spectral index can be specified per component with: * Spectral_Index: spectral index

  • source_select_kwds (dict, optional) – Dictionary of keywords for source selection. Valid options:

    • lst_array: For coarse RA horizon cuts, lsts used in the simulation [radians]

    • latitude_deg: Latitude of telescope in degrees. Used for declination coarse

    • horizon cut.

    • horizon_buffer: Angle (float, in radians) of buffer for coarse horizon cut. Default is about 10 minutes of sky rotation. (See caveats in array_to_skymodel() docstring)

    • min_flux: Minimum stokes I flux to select [Jy]

    • max_flux: Maximum stokes I flux to select [Jy]

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

classmethod from_text_catalog(catalog_csv, **kwargs)[source]

Create a SkyModel from a text catalog.

Parameters

kwargs – All parameters are sent through to read_text_catalog().

Returns

sky_model (SkyModel) – The object instantiated using the text catalog.

read_fhd_catalog(filename_sav, expand_extended=True, source_select_kwds=None, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Read in an FHD style catalog file.

FHD catalog files are IDL save files.

Parameters
  • filename_sav (str) – Path to IDL .sav file.

  • expand_extended (bool) – If True, return extended source components. Default: True

  • source_select_kwds (dict, optional) – Dictionary of keywords for source selection. Valid options:

    • lst_array: For coarse RA horizon cuts, lsts used in the simulation [radians]

    • latitude_deg: Latitude of telescope in degrees. Used for declination coarse

    • horizon cut.

    • horizon_buffer: Angle (float, in radians) of buffer for coarse horizon cut. Default is about 10 minutes of sky rotation. (See caveats in array_to_skymodel() docstring)

    • min_flux: Minimum stokes I flux to select [Jy]

    • max_flux: Maximum stokes I flux to select [Jy]

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

classmethod from_fhd_catalog(filename_sav, **kwargs)[source]

Create a SkyModel from an FHD catalog.

Parameters

kwargs – All parameters are sent through to read_fhd_catalog().

Returns

sky_model (SkyModel) – The object instantiated using the FHD catalog.

read_idl_catalog(filename_sav, expand_extended=True, source_select_kwds=None, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Read in an FHD style catalog file.

Deprecated. Use read_fhd_catalog instead.

Parameters
  • filename_sav (str) – Path to IDL .sav file.

  • expand_extended (bool) – If True, return extended source components. Default: True

  • source_select_kwds (dict, optional) – Dictionary of keywords for source selection. Valid options:

    • lst_array: For coarse RA horizon cuts, lsts used in the simulation [radians]

    • latitude_deg: Latitude of telescope in degrees. Used for declination coarse

    • horizon cut.

    • horizon_buffer: Angle (float, in radians) of buffer for coarse horizon cut. Default is about 10 minutes of sky rotation. (See caveats in array_to_skymodel() docstring)

    • min_flux: Minimum stokes I flux to select [Jy]

    • max_flux: Maximum stokes I flux to select [Jy]

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

write_skyh5(filename, data_compression=None, run_check=True, check_extra=True, run_check_acceptability=True)[source]

Write this object to a skyh5 file (our flavor of hdf5).

Parameters
  • filename (str) – Path and name of the file to write to.

  • data_compression (str) – HDF5 filter to apply when writing the stokes data. Default is None (no filter/compression). One reasonable option to reduce file size is “gzip”.

  • run_check (bool) – Option to check for the existence and proper shapes of parameters after downselecting data on this object (the default is True, meaning the check will be run).

  • check_extra (bool) – Option to check optional parameters as well as required ones (the default is True, meaning the optional parameters will be checked).

  • run_check_acceptability (bool) – Option to check acceptable range of the values of parameters after downselecting data on this object (the default is True, meaning the acceptable range check will be done).

write_healpix_hdf5(filename)[source]

Write a set of HEALPix maps to an HDF5 file.

Deprecated. Support for this file format will be removed in version 0.3.0. Use write_skyh5 to read our newer skyh5 file type.

Parameters

filename (str) – Name of file to write to.

write_text_catalog(filename)[source]

Write out this object to a text file.

Readable with read_text_catalog().

Parameters

filename (str) – Path to output file (string)