- class AstroToolkit.Data.hrdquery.HrdStruct[source]
This structure is returned from hrd queries, when read from a hrd file that was originally created by an image query, or through the Models module (in which case all attributes are set to None).
Attributes
- kindstr
“hrd”
- survey: str
“gaia”
- sourcesint
Gaia source IDs of target systems
- identifiersstr
Positions of target systems in JHHMMSS.SS±DDMMSS.SS format
- datanamestr
Default file for the
savedata()method- plotnamestr
Default file name for the
showplot()andsaveplot()methods- figureBokeh figure
Stores figures generated by the
plot()method- data: dict
Returned data in the form:
"bp-rp": [bp-rp colour of sources] "absg": [absolute g magnitude of sources]
Methods
- exportplot(fname)
Exports the figure stored in the ‘figure’ attribute to a PNG, and saves it to local files. If the data structure doesn’t yet hold a figure, one will be generated with a default configuration first.
- Parameters:
fname (str, optional) – file name to same the figure to, defaults to file name given by the data structure’s ‘plotname’ attribute
- Returns:
file name to which the figure was saved
- Return type:
str
- plot(**kwargs)
Plots data contained within a given data stucture and assigns the resulting figure to the data structure’s ‘figure’ attribute.
Note: Some data structures may allow for additional optional arguments, see their specific plot() methods for details.
- savedata(fname)
Saves a data structure’s data to local files.
- Parameters:
fname (str, optional) – overrides file name, defaults to file name given by the data structure’s ‘dataname’ attribute
- Returns:
name of file to which data was saved
- Return type:
str
- saveplot(fname)
Saves the figure stored in the ‘figure’ attribute to local files without opening it in the web browser. If the data structure doesn’t yet hold a figure, one will be generated with a default configuration first.
- Parameters:
fname (str, optional) – file name to save the figure to, defaults to file name given by the data structure’s ‘plotname’ attribute
- Returns:
file name to which the figure was saved
- Return type:
str
- showdata(pprint, print_methods)
Prints data structure to stdout in a readable format.
- Parameters:
pprint (bool, optional) – collapse arrays and other objects to improve readability, defaults to True
- Returns:
Self
- showplot(fname)
Opens the figure stored in the ‘figure’ attribute in the default web browser, and saves it to local files. If the data structure doesn’t yet hold a figure, one will be generated with a default configuration first.
- Parameters:
fname (str, optional) – file name to save the figure to, defaults to file name given by the data structure’s ‘plotname’ attribute
- Returns:
file name to which the figure was saved
- Return type:
str