SSARecord

class pyvo.dal.SSARecord(results, index, session=None)[source]

Bases: pyvo.dal.adhoc.SodaRecordMixin, pyvo.dal.adhoc.DatalinkRecordMixin, pyvo.dal.Record

a dictionary-like container for data in a record from the results of an SSA query, describing an available spectrum.

The commonly accessed metadata which are stadardized by the SSA protocol are available as attributes. If the metadatum accessible via an attribute is not available, the value of that attribute will be None. All metadata, including non-standard metadata, are acessible via the get( key ) function (or the [key] operator) where key is table column name.

Attributes Summary

acref return the URL that can be used to retrieve the spectrum.
dateobs return the modified Julien date (MJD) of the mid-point of the observational data that went into the spectrum
dec return the declination of the center of the spectrum
filesize The (estimated) size of the image in bytes
format return the file format that this the spectrum is stored in
instr return the name of the instrument (or instruments) that produced the data that went into this spectrum.
ra return the right ascension of the center of the spectrum
title return the title of the spectrum

Methods Summary

broadcast_samp(self[, client_name]) Broadcast the spectrum to client_name via SAMP
getdataurl(self) return the URL contained in the access URL column which can be used to retrieve the dataset described by this record.
suggest_dataset_basename(self) return a default base filename that the dataset available via getdataset() can be saved as.
suggest_extension(self[, default]) returns a recommended filename extension for the dataset described by this record.

Attributes Documentation

acref

return the URL that can be used to retrieve the spectrum.

dateobs

return the modified Julien date (MJD) of the mid-point of the observational data that went into the spectrum

dec

return the declination of the center of the spectrum

filesize

The (estimated) size of the image in bytes

format

return the file format that this the spectrum is stored in

instr

return the name of the instrument (or instruments) that produced the data that went into this spectrum.

ra

return the right ascension of the center of the spectrum

title

return the title of the spectrum

Methods Documentation

broadcast_samp(self, client_name=None)[source]

Broadcast the spectrum to client_name via SAMP

getdataurl(self)[source]

return the URL contained in the access URL column which can be used to retrieve the dataset described by this record. None is returned if no such column exists.

suggest_dataset_basename(self)[source]

return a default base filename that the dataset available via getdataset() can be saved as. This function is specialized for a particular service type this record originates from so that it can be used by cachedataset() via make_dataset_filename().

suggest_extension(self, default=None)[source]

returns a recommended filename extension for the dataset described by this record. Typically, this would look at the column describing the format and choose an extension accordingly.