Datapages
This module assists in creating datapages, and provides additional panels for this purpose. It is greatly recommended to see the datapage examples alongside this section.
- AstroToolkit.Datapages.buttons(source/pos, **kwargs)[source]
Generates Vizier and SIMBAD search buttons for a given target.
- Parameters:
source (int) – Target GAIA DR3 Source ID
pos (list<float>) – Position [right ascension, declination] in degrees
radius (float, optional) – Search radius in arcseconds, default given by datapage_search_button_radius config key
grid_size (int, optional) – datapage grid size used for scaling, default given by datapage_grid_size config kkey
- Returns:
Vizier and SIMBAD search buttons
- Return type:
bokeh figure
- AstroToolkit.Datapages.datapage(dimensions, panels, layout, **kwargs)[source]
Assists in generating datapages from a set of figures or ATK data structures by adjusting scaling, sizing, style and layout. See the Creating a Datapage tutorial for an example.
- Parameters:
dimensions (dict) – dimensions of datapage, in the form:
dimensions = { 'width': width (grid units) 'height': height (grid units) }
- Parameters:
plots (list<dict>) – list of plot entries with each entry in format:
entry = { 'name': name to assign to the figure 'figure': The figure to give this panel, this can either be an ATK structure that supports plotting (lightcurve, image, etc.) or a Bokeh figure. If filling empty space, None can instead be passed to create a blank panel 'width': width of panel in grid units 'height': height of panel in grid units }
- Parameters:
layout (list<list>) – layout of grid, e.g.:
layouts = [ [plot0, plot1, [plot2, plot3]], [plot4, plot5, plot6], [plot7, plot8, plot9], ]
Which would generate the following datapage (assuming all panel sizes were set correctly):
+---------+---------+---------+ | | | plot2 | | plot0 | plot1 +---------+ | | | plot3 | +---------+---------+---------+ | | | | | plot4 | plot5 | plot6 | | | | | +---------+---------+---------+ | | | | | plot7 | plot8 | plot9 | | | | | +---------+---------+---------+
- Returns:
- AstroToolkit.Datapages.datatable(entries, source/pos, **kwargs)[source]
Generates a datatable for a given target.
- Parameters:
source (int) – Target GAIA DR3 Source ID
pos (list<float>) – Position [right ascension, declination] in degrees
radius (float, optional) – search radius to use when fetching data from supported surveys in arcseconds, default given by datapage_datatable_radius <cfg_datapage_datatable_radius> config key
entries (dict/list<dict>) – datatable entry or list of datatable entries
Each datatable entry in entries can take three different forms.
- Returns:
ATK Datatable
- Return type:
Bokeh figure
Default Entries
For data surveys that are supported by ATK, default entries are available. These contain key astrometry and photometry. To use these default entries:
entry = { "kind": "atk_defaults", "surveys": <surveys>, }
where:
- Parameters:
surveys (list<str>) – list of supported ATK data surveys to include in the datatable
Vizier Entries
To generate a table entry using any catalogue available in Vizier:
entry = { "kind": "vizier", "survey": <survey>, "parameters": <parameters>, "errors": <errors>, "notes": <notes", }
where:
- Parameters:
survey (str) – any Vizier catalogue ID, or the name of a user-defined catalogue alias
parameters (list<str>) – names of parameters (i.e. Vizier column headers) that exist in chosen catalogue
errors (list<str>) – names of errors on these parameters (i.e. Vizier column headers) that exist in chosen catalogue
notes (list<str>) – any notes to include on each of the chosen parameters/errors
Custom Entries
To include entries using external data:
entry = { "kind": "external" "survey": <survey>, "parameters": <parameters>, "values": <values>, "errors": <errors>, "notes": <notes>, }
where:
- Parameters:
survey (str) – name of source from which data originates
parameters (list<str>) – names of parameters
values (list<float>) – values of these parameters
errors (list<float>) – errors on these parameters
notes (list<str>) – any notes to include on each of the chosen parameters/errors