CallistoSpectrogram

class sunpy.spectra.sources.CallistoSpectrogram(data, time_axis, freq_axis, start, end, t_init=None, t_delt=None, t_label='Time', f_label='Frequency', content='', instruments=None, header=None, axes_header=None, swapped=False)[source] [edit on github]

Bases: sunpy.spectra.spectrogram.LinearTimeSpectrogram

Class used for dynamic spectra coming from the Callisto network.

header

Header – main header of the FITS file

axes_header

Header – header for the axes table

swapped

bool – flag that specifies whether originally in the file the x-axis was frequency

Attributes Summary

COPY_PROPERTIES
INSTRUMENTS
SIGMA_DELTA_SUM
SIGMA_SUM

Methods Summary

create(*args, **kwargs) Create CallistoSpectrogram from given input dispatching to the appropriate from_* function.
extend([minutes]) Requests subsequent files from the server.
from_range(instrument, start, end, **kwargs) Automatically download data from instrument between start and end and join it together.
from_url(url) Returns CallistoSpectrogram read from URL.
get_header() Returns the updated header.
homogenize(other[, maxdiff]) Return overlapping part of self and other as (self, other) tuple.
is_datasource_for(header) Check if class supports data from the given FITS file.
read(filename, **kwargs) Reads in FITS file and return a new CallistoSpectrogram.
read_many(filenames[, sort_by]) Returns a list of CallistoSpectrogram objects read from filenames.
remove_border() Remove duplicate entries on the borders.
save(filepath) Save modified spectrogram back to filepath.

Attributes Documentation

COPY_PROPERTIES = [('time_axis', 1), ('freq_axis', 1), ('instruments', 1), ('start', 0), ('end', 0), ('t_label', 0), ('f_label', 0), ('content', 0), ('t_init', 0), ('t_delt', 0), ('header', 0), ('swapped', 0), ('axes_header', 0)]
INSTRUMENTS = {'MRT2', 'UNAM', 'OSRA', 'KRIM', 'BIR', 'ALMATY', 'KASI', 'ALASKA', 'KENYA', 'MALAYSIA', 'HURBANOVO', 'MRT1', 'OOTY', 'SWMC', 'HUMAIN', 'TRIEST', 'DARO', 'HB9SCT'}
SIGMA_DELTA_SUM = 20
SIGMA_SUM = 75

Methods Documentation

classmethod create(*args, **kwargs) [edit on github]
Create CallistoSpectrogram from given input dispatching to the
appropriate from_* function.

Possible signatures:

create(filename: str) -> from_file()

create(directory: str) -> from_dir()

create(singlepattern: str) -> from_single_glob()

create(pattern: str) -> from_glob()

create(filenames: list) -> from_files()

create(url: str) -> from_url()

create(instrument, start, end) -> from_range()

extend(minutes=15, **kwargs)[source] [edit on github]

Requests subsequent files from the server. If minutes is negative, retrieve preceding files.

classmethod from_range(instrument, start, end, **kwargs)[source] [edit on github]

Automatically download data from instrument between start and end and join it together.

Parameters:
  • instrument (str) – instrument to retrieve the data from
  • start (parse_time compatible) – start of the measurement
  • end (parse_time compatible) – end of the measurement
classmethod from_url(url)[source] [edit on github]

Returns CallistoSpectrogram read from URL.

Parameters:url (str) – URL to retrieve the data from
Returns:newSpectrogram (sunpy.spectra.CallistoSpectrogram)
get_header()[source] [edit on github]

Returns the updated header.

homogenize(other, maxdiff=1)[source] [edit on github]

Return overlapping part of self and other as (self, other) tuple. Homogenize intensities so that the images can be used with combine_frequencies. Note that this works best when most of the picture is signal, so use in_interval() to select the subset of your image before applying this method.

Parameters:
  • other (sunpy.spectra.CallistoSpectrogram) – Spectrogram to be homogenized with the current one.
  • maxdiff (float) – Threshold for which frequencies are considered equal.
classmethod is_datasource_for(header)[source] [edit on github]

Check if class supports data from the given FITS file.

Parameters:header (Header) – main header of the FITS file
classmethod read(filename, **kwargs)[source] [edit on github]

Reads in FITS file and return a new CallistoSpectrogram. Any unknown (i.e. any except filename) keyword arguments get passed to fits.open.

Parameters:filename (str) – path of the file to read
classmethod read_many(filenames, sort_by=None)[source] [edit on github]

Returns a list of CallistoSpectrogram objects read from filenames.

Parameters:
  • filenames (list of str) – list of paths to read from
  • sort_by (str) – optional attribute of the resulting objects to sort from, e.g. start to sort by starting time.
remove_border()[source] [edit on github]

Remove duplicate entries on the borders.

save(filepath)[source] [edit on github]

Save modified spectrogram back to filepath.

Parameters:filepath (str) – path to save the spectrogram to