Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- get_datasets_directory()
- load_dataset(String, String)
- load_dataset(String, String, boolean)
- load_dataset(String, String, CatalogInfo.CatalogInfoSource, boolean)
- load_dataset(String, String, CatalogInfo.CatalogInfoSource, DatasetOptions, boolean)
- load_dataset(String, DataSource, CatalogInfo.CatalogInfoSource, DatasetOptions, boolean)
- load_star_dataset(String, String, boolean)
- load_star_dataset(String, String, double, boolean)
- load_star_dataset(String, String, double, double[], boolean)
- load_star_dataset(String, String, double, List, boolean)
- load_star_dataset(String, String, double, double[], double[], double[], boolean)
- load_star_dataset(String, String, double, List, List, List, boolean)
- load_star_dataset(String, String, CatalogInfo.CatalogInfoSource, double, double[], double[], double[], boolean)
- load_particle_dataset(String, String, double, double[], double, double[], double, String, boolean)
- load_particle_dataset(String, String, double, List, double, List, double, String, boolean)
- load_particle_dataset(String, String, double, double[], double, double[], double, String, double[], double[], boolean)
- load_particle_dataset(String, String, double, List, double, List, double, String, List, List, boolean)
- load_particle_dataset(String, String, double, double[], double, double[], double, double[], String, double[], double[], boolean)
- load_particle_dataset(String, String, double, List, double, List, double, List, String, List, List, boolean)
- load_particle_dataset(String, String, double, double[], double, double[], double, double[], ComponentTypes.ComponentType, double[], double[], boolean)
- load_particle_dataset(String, String, CatalogInfo.CatalogInfoSource, double, double[], double, double[], double, double[], ComponentTypes.ComponentType, double[], double[], boolean)
- load_star_cluster_dataset(String, String, double[], double[], double[], boolean)
- load_star_cluster_dataset(String, String, List, List, List, boolean)
- load_star_cluster_dataset(String, String, double[], double[], double[], double[], boolean)
- load_star_cluster_dataset(String, String, List, List, List, List, boolean)
- load_star_cluster_dataset(String, String, double[], String, double[], double[], boolean)
- load_star_cluster_dataset(String, String, List, String, List, List, boolean)
- load_star_cluster_dataset(String, String, double[], double[], String, double[], double[], boolean)
- load_variable_star_dataset(String, String, double, double[], double[], double[], boolean)
- load_variable_star_dataset(String, String, CatalogInfo.CatalogInfoSource, double, double[], double[], double[], boolean)
- load_star_cluster_dataset(String, String, List, List, String, List, List, boolean)
- load_json_dataset(String, String)
- load_json_dataset(String, String, boolean)
- load_json_dataset(String, String, boolean, boolean)
- dataset_exists(String)
- set_dataset_transform_matrix(String, double[])
- clear_dataset_transform_matrix(String)
- remove_dataset(String)
- hide_dataset(String)
- show_dataset(String)
- highlight_dataset(String, boolean)
- highlight_dataset(String, int, boolean)
- highlight_dataset(String, float[], boolean)
- highlight_dataset(String, String, String, double, double, boolean)
- set_dataset_highlight_size_factor(String, float)
- set_dataset_highlight_all_visible(String, boolean)
- set_dataset_point_size_factor(String, double)
- list_datasets()
- notify(Event, Object, Object...)
Class DataModule
java.lang.Object
gaiasky.script.v2.impl.APIModule
gaiasky.script.v2.impl.DataModule
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDataModule
(EventManager em, APIv2 api, String name) Create a new module with the given attributes. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Clear the transformation matrix (if any) in the dataset identified by the given name.boolean
dataset_exists
(String name) Check whether the dataset identified by the given name is loadedReturn the current datasets location on disk.boolean
hide_dataset
(String name) Hide the dataset identified by the given name, if it exists and is not hidden.boolean
highlight_dataset
(String name, boolean highlight) Enable or disable the dataset highlight using a plain color chosen by the system.boolean
highlight_dataset
(String name, float[] color, boolean highlight) Enable or disable the dataset highlight, using a given plain color.boolean
highlight_dataset
(String name, int color_idx, boolean highlight) Enable or disable the dataset highlight, using a plain color given by the color index: 0 - blue 1 - red 2 - yellow 3 - green 4 - pink 5 - orange 6 - purple 7 - brown 8 - magentaboolean
highlight_dataset
(String name, String attr_name, String colmap, double min, double max, boolean highlight) Enable or disable the dataset highlight, using the given color map on the given attribute with the given maximum and minimum mapping values.Return the names of all datasets currently loaded.boolean
load_dataset
(String name, String absolutePath) Load a VOTable, FITS, CSV or JSON dataset file with the given name.boolean
load_dataset
(String name, String path, boolean sync) Load a VOTable, FITS, CSV or JSON dataset file with the given name.boolean
load_dataset
(String dsName, String path, CatalogInfo.CatalogInfoSource type, boolean sync) boolean
load_dataset
(String name, String path, CatalogInfo.CatalogInfoSource type, DatasetOptions datasetOptions, boolean sync) Load a VOTable, FITS, CSV or JSON dataset file with the given name.boolean
load_dataset
(String dsName, uk.ac.starlink.util.DataSource ds, CatalogInfo.CatalogInfoSource type, DatasetOptions datasetOptions, boolean sync) boolean
load_json_dataset
(String name, String path) Load a Gaia Sky JSON dataset file asynchronously.boolean
load_json_dataset
(String name, String pathString, boolean sync) Load a Gaia Sky JSON dataset file in a synchronous or asynchronous manner.boolean
load_json_dataset
(String name, String pathString, boolean select, boolean sync) Load a Gaia Sky JSON dataset file in a synchronous or asynchronous manner.boolean
load_particle_dataset
(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync) boolean
load_particle_dataset
(String name, String path, double decay, double[] color, double noise, double[] label_color, double size, double[] size_limits, String ct, double[] fadein, double[] fadeout, boolean sync) Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file.boolean
load_particle_dataset
(String name, String path, double decay, double[] color, double noise, double[] label_color, double size, String ct, boolean sync) Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file.boolean
load_particle_dataset
(String name, String path, double decay, double[] color, double noise, double[] label_color, double size, String ct, double[] fadein, double[] fadeout, boolean sync) Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file.boolean
load_particle_dataset
(String dsName, String path, double profileDecay, List<?> particleColor, double colorNoise, List<?> labelColor, double particleSize, String ct, boolean sync) boolean
load_particle_dataset
(String dsName, String path, double profileDecay, List<?> particleColor, double colorNoise, List<?> labelColor, double particleSize, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync) boolean
load_particle_dataset
(String dsName, String path, double profileDecay, List<?> particleColor, double colorNoise, List<?> labelColor, double particleSize, List<?> sizeLimits, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync) boolean
load_particle_dataset
(String dsName, String path, CatalogInfo.CatalogInfoSource type, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync) boolean
load_star_cluster_dataset
(String name, String path, double[] particleColor, double[] fadein, double[] fadeout, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file.boolean
load_star_cluster_dataset
(String name, String path, double[] color, double[] label_color, double[] fadein, double[] fadeout, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file.boolean
load_star_cluster_dataset
(String name, String path, double[] color, double[] label_color, String ct, double[] fadein, double[] fadeout, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file.boolean
load_star_cluster_dataset
(String name, String path, double[] color, String ct, double[] fadein, double[] fadeout, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file.boolean
load_star_cluster_dataset
(String dsName, String path, List<?> particleColor, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync) boolean
load_star_cluster_dataset
(String dsName, String path, List<?> particleColor, List<?> labelColor, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync) boolean
load_star_cluster_dataset
(String dsName, String path, List<?> particleColor, List<?> fadeIn, List<?> fadeOut, boolean sync) boolean
load_star_cluster_dataset
(String dsName, String path, List<?> particleColor, List<?> labelColor, List<?> fadeIn, List<?> fadeOut, boolean sync) boolean
load_star_dataset
(String name, String path, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file.boolean
load_star_dataset
(String name, String path, double factor, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file.boolean
load_star_dataset
(String name, String path, double factor, double[] label_color, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file.boolean
load_star_dataset
(String name, String path, double factor, double[] label_color, double[] fadein, double[] fadeout, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file.boolean
load_star_dataset
(String dsName, String path, double magnitudeScale, List<?> labelColor, boolean sync) boolean
load_star_dataset
(String dsName, String path, double magnitudeScale, List<?> labelColor, List<?> fadeIn, List<?> fadeOut, boolean sync) boolean
load_star_dataset
(String dsName, String path, CatalogInfo.CatalogInfoSource type, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) boolean
load_variable_star_dataset
(String name, String path, double factor, double[] label_color, double[] fadein, double[] fadeout, boolean sync) Load a variable star dataset from a VOTable, CSV or FITS file.boolean
load_variable_star_dataset
(String dsName, String path, CatalogInfo.CatalogInfoSource type, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) void
Event notification call.boolean
remove_dataset
(String name) Remove the dataset identified by the given name, if it exists.boolean
set_dataset_highlight_all_visible
(String name, boolean visible) Set the 'all visible' property of datasets when highlighted.boolean
set_dataset_highlight_size_factor
(String name, float factor) Set the size increase factor of this dataset when highlighted.void
set_dataset_point_size_factor
(String name, double multiplier) Set the dataset point size multiplier.boolean
set_dataset_transform_matrix
(String name, double[] matrix) Set the given 4x4 matrix (in column-major order) as the transformation matrix to apply to all the data points in the dataset identified by the given name.boolean
show_dataset
(String name) Show (un-hide) the dataset identified by the given name, if it exists and is hidden
-
Constructor Details
-
Method Details
-
get_datasets_directory
Description copied from interface:DataAPI
Return the current datasets location on disk. This is stored in a setting in the configuration file, and points to the actual location where datasets are stored.If you want the default datasets location, use
BaseModule.get_default_datasets_dir()
.- Specified by:
get_datasets_directory
in interfaceDataAPI
- Returns:
- The path to the current location used to store datasets.
-
load_dataset
Description copied from interface:DataAPI
Load a VOTable, FITS, CSV or JSON dataset file with the given name. In this version, the loading happens synchronously, so the catalog is available to Gaia Sky immediately after this call returns. The actual loading process is carried out making educated guesses about semantics using UCDs and column names. Please check the official documentation for a complete reference on what can and what can't be loaded.- Specified by:
load_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset, used to identify the subsequent operations on the dataset.absolutePath
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
file to load.- Returns:
- False if the dataset could not be loaded, true otherwise.
-
load_dataset
Description copied from interface:DataAPI
Load a VOTable, FITS, CSV or JSON dataset file with the given name. The call can be made synchronous or asynchronous.
Ifsync
is true, the call acts exactly likeDataAPI.load_dataset(String, String)
.
Ifsync
is false, the loading happens in a new thread and the call returns immediately. In this case, you can useDataAPI.dataset_exists(String)
to check whether the dataset is already loaded and available. The actual loading process is carried out making educated guesses about semantics using UCDs and column names. Please check the official documentation for a complete reference on what can and what can't be loaded.- Specified by:
load_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset, used to identify the subsequent operations on the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the file to load.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_dataset
public boolean load_dataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, boolean sync) -
load_dataset
public boolean load_dataset(String name, String path, CatalogInfo.CatalogInfoSource type, DatasetOptions datasetOptions, boolean sync) Description copied from interface:DataAPI
Load a VOTable, FITS, CSV or JSON dataset file with the given name. The call can be made synchronous or asynchronous.
Ifsync
is true, the call acts exactly likeDataAPI.load_dataset(String, String, boolean)
.
Ifsync
is false, the loading happens in a new thread and the call returns immediately. In this case, you can useDataAPI.dataset_exists(String)
to check whether the dataset is already loaded and available. The actual loading process is carried out making educated guesses about semantics using UCDs and column names. Please check the official documentation for a complete reference on what can and what can't be loaded. This version includes the catalog info type.- Specified by:
load_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset, used to identify the subsequent operations on the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the file to load.type
- TheCatalogInfo.CatalogInfoSource
object to use as the dataset type.datasetOptions
- TheDatasetOptions
object holding the options for this dataset.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_dataset
public boolean load_dataset(String dsName, uk.ac.starlink.util.DataSource ds, CatalogInfo.CatalogInfoSource type, DatasetOptions datasetOptions, boolean sync) -
load_star_dataset
Description copied from interface:DataAPI
Load a star dataset from a VOTable, a CSV or a FITS file. The dataset does not have a label. The call can be made synchronous or asynchronous.
Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_star_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_star_dataset
Description copied from interface:DataAPI
Load a star dataset from a VOTable, a CSV or a FITS file. The dataset does not have a label. The call can be made synchronous or asynchronous.
Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_star_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.factor
- Scaling additive factor to apply to the star magnitudes, as inappmag = appmag - magnitudeScale
.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_star_dataset
public boolean load_star_dataset(String name, String path, double factor, double[] label_color, boolean sync) Description copied from interface:DataAPI
Load a star dataset from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_star_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.factor
- Scaling additive factor to apply to the star magnitudes, as inappmag = appmag - magnitudeScale
.label_color
- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_star_dataset
-
load_star_dataset
public boolean load_star_dataset(String name, String path, double factor, double[] label_color, double[] fadein, double[] fadeout, boolean sync) Description copied from interface:DataAPI
Load a star dataset from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_star_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.factor
- Scaling additive factor to apply to the star magnitudes, as inappmag = appmag - magnitudeScale
.label_color
- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].fadein
- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeout
- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_star_dataset
-
load_star_dataset
public boolean load_star_dataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) -
load_particle_dataset
public boolean load_particle_dataset(String name, String path, double decay, double[] color, double noise, double[] label_color, double size, String ct, boolean sync) Description copied from interface:DataAPI
Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_particle_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.decay
- The profile decay of the particles as in 1 - distCentre^decay.color
- The base color of the particles, as an array of RGBA (red, green, blue, alpha) values in [0,1].noise
- In [0,1], the noise to apply to the color so that each particle gets a slightly different tone. Set to 0 so that all particles get the same color.label_color
- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].size
- The size of the particles in pixels.ct
- The name of the component type to use like "Stars", "Galaxies", etc. (seeComponentTypes.ComponentType
).sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_particle_dataset
-
load_particle_dataset
public boolean load_particle_dataset(String name, String path, double decay, double[] color, double noise, double[] label_color, double size, String ct, double[] fadein, double[] fadeout, boolean sync) Description copied from interface:DataAPI
Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_particle_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.decay
- The profile decay of the particles as in 1 - distCentre^decay.color
- The base color of the particles, as an array of RGBA (red, green, blue, alpha) values in [0,1].noise
- In [0,1], the noise to apply to the color so that each particle gets a slightly different tone. Set to 0 so that all particles get the same color.label_color
- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].size
- The size of the particles in pixels.ct
- The name of the component type to use like "Stars", "Galaxies", etc. (seeComponentTypes.ComponentType
).fadein
- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeout
- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_particle_dataset
-
load_particle_dataset
public boolean load_particle_dataset(String name, String path, double decay, double[] color, double noise, double[] label_color, double size, double[] size_limits, String ct, double[] fadein, double[] fadeout, boolean sync) Description copied from interface:DataAPI
Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_particle_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.decay
- The profile decay of the particles as in 1 - distCentre^decay.color
- The base color of the particles, as an array of RGBA (red, green, blue, alpha) values in [0,1].noise
- In [0,1], the noise to apply to the color so that each particle gets a slightly different tone. Set to 0 so that all particles get the same color.label_color
- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].size
- The size of the particles in pixels.size_limits
- The minimum and maximum size of the particles in pixels.ct
- The name of the component type to use like "Stars", "Galaxies", etc. (seeComponentTypes.ComponentType
).fadein
- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeout
- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_particle_dataset
-
load_particle_dataset
public boolean load_particle_dataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync) -
load_particle_dataset
public boolean load_particle_dataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync) -
load_star_cluster_dataset
public boolean load_star_cluster_dataset(String name, String path, double[] particleColor, double[] fadein, double[] fadeout, boolean sync) Description copied from interface:DataAPI
Load a star cluster dataset from a CSV, VOTable or FITS file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. Uses the same color for clusters and labels. The call can be made synchronous or asynchronous. Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_star_cluster_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.particleColor
- The base color of the particles and labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].fadein
- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeout
- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_star_cluster_dataset
-
load_star_cluster_dataset
public boolean load_star_cluster_dataset(String name, String path, double[] color, double[] label_color, double[] fadein, double[] fadeout, boolean sync) Description copied from interface:DataAPI
Load a star cluster dataset from a CSV, VOTable or FITS file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. The call can be made synchronous or asynchronous. Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_star_cluster_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.color
- The base color of the particles, as an array of RGBA (red, green, blue, alpha) values in [0,1].label_color
- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].fadein
- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeout
- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_star_cluster_dataset
-
load_star_cluster_dataset
public boolean load_star_cluster_dataset(String name, String path, double[] color, String ct, double[] fadein, double[] fadeout, boolean sync) Description copied from interface:DataAPI
Load a star cluster dataset from a CSV, VOTable or FITS file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. Uses the same color for clusters and labels. The call can be made synchronous or asynchronous. Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_star_cluster_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.color
- The base color of the particles and labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].ct
- The name of the component type to use (seeComponentTypes.ComponentType
).fadein
- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeout
- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_star_cluster_dataset
-
load_star_cluster_dataset
public boolean load_star_cluster_dataset(String name, String path, double[] color, double[] label_color, String ct, double[] fadein, double[] fadeout, boolean sync) Description copied from interface:DataAPI
Load a star cluster dataset from a CSV, VOTable or FITS file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. The call can be made synchronous or asynchronous. Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_star_cluster_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.color
- The base color of the particles and labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].label_color
- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].ct
- The name of the component type to use (seeComponentTypes.ComponentType
).fadein
- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeout
- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_variable_star_dataset
public boolean load_variable_star_dataset(String name, String path, double factor, double[] label_color, double[] fadein, double[] fadeout, boolean sync) Description copied from interface:DataAPI
Load a variable star dataset from a VOTable, CSV or FITS file. The variable star table must have the following columns representing the light curve:g_transit_time
: list of times as Julian days since J2010 for each of the magnitudesg_transit_mag
: list of magnitudes corresponding to the times ing_transit_times
pf
: the period in days
Ifsync
is true, the call waits until the dataset is loaded and then returns. Ifsync
is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Specified by:
load_variable_star_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- Absolute path (or relative to the working path of Gaia Sky) to the.vot
,.csv
or.fits
file to load.factor
- Scaling additive factor to apply to the magnitudes in the light curve, as inappmag = appmag - magnitudeScale
.label_color
- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].fadein
- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeout
- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync
- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
sync
is false.
-
load_variable_star_dataset
public boolean load_variable_star_dataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) -
load_star_cluster_dataset
-
load_json_dataset
Description copied from interface:DataAPI
Load a Gaia Sky JSON dataset file asynchronously. The call returns immediately, and the dataset becomes available when it finished loading. The Gaia Sky JSON data format is described here.- Specified by:
load_json_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.path
- The absolute path, or the path in the data directory, of the dataset file.- Returns:
- False if the dataset could not be loaded. True otherwise.
-
load_json_dataset
Description copied from interface:DataAPI
Load a Gaia Sky JSON dataset file in a synchronous or asynchronous manner. The Gaia Sky JSON data format is described here.- Specified by:
load_json_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.pathString
- The absolute path, or the path in the data directory, of the dataset file.sync
- If true, the call does not return until the dataset is loaded and available in Gaia Sky.- Returns:
- False if the dataset could not be loaded. True otherwise.
-
load_json_dataset
Description copied from interface:DataAPI
Load a Gaia Sky JSON dataset file in a synchronous or asynchronous manner. The Gaia Sky JSON data format is described here.- Specified by:
load_json_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.pathString
- The absolute path, or the path in the data directory, of the dataset file.select
- If true, focus the first object in the dataset after loading.sync
- If true, the call does not return until the dataset is loaded and available in Gaia Sky.- Returns:
- False if the dataset could not be loaded. True otherwise.
-
dataset_exists
Description copied from interface:DataAPI
Check whether the dataset identified by the given name is loaded- Specified by:
dataset_exists
in interfaceDataAPI
- Parameters:
name
- The name of the dataset to query.- Returns:
- True if the dataset is loaded, false otherwise.
-
set_dataset_transform_matrix
Description copied from interface:DataAPI
Set the given 4x4 matrix (in column-major order) as the transformation matrix to apply to all the data points in the dataset identified by the given name.- Specified by:
set_dataset_transform_matrix
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.matrix
- The 16 values of the 4x4 transformation matrix in column-major order.- Returns:
- True if the dataset was found and the transformation matrix could be applied. False otherwise.
-
clear_dataset_transform_matrix
Description copied from interface:DataAPI
Clear the transformation matrix (if any) in the dataset identified by the given name.- Specified by:
clear_dataset_transform_matrix
in interfaceDataAPI
- Parameters:
name
- The name of the dataset.- Returns:
- True if the dataset was found and the transformations cleared.
-
remove_dataset
Description copied from interface:DataAPI
Remove the dataset identified by the given name, if it exists.- Specified by:
remove_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset to remove.- Returns:
- False if the dataset could not be found.
-
hide_dataset
Description copied from interface:DataAPI
Hide the dataset identified by the given name, if it exists and is not hidden.- Specified by:
hide_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset to hide.- Returns:
- False if the dataset could not be found.
-
show_dataset
Description copied from interface:DataAPI
Show (un-hide) the dataset identified by the given name, if it exists and is hidden- Specified by:
show_dataset
in interfaceDataAPI
- Parameters:
name
- The name of the dataset to show.- Returns:
- False if the dataset could not be found.
-
highlight_dataset
Description copied from interface:DataAPI
Enable or disable the dataset highlight using a plain color chosen by the system.- Specified by:
highlight_dataset
in interfaceDataAPI
- Parameters:
name
- The dataset name.highlight
- State.- Returns:
- False if the dataset could not be found.
-
highlight_dataset
Description copied from interface:DataAPI
Enable or disable the dataset highlight, using a plain color given by the color index:- 0 - blue
- 1 - red
- 2 - yellow
- 3 - green
- 4 - pink
- 5 - orange
- 6 - purple
- 7 - brown
- 8 - magenta
- Specified by:
highlight_dataset
in interfaceDataAPI
- Parameters:
name
- The dataset name.color_idx
- Color index in [0,8].highlight
- Whether to highlight or not.- Returns:
- False if the dataset could not be found.
-
highlight_dataset
Description copied from interface:DataAPI
Enable or disable the dataset highlight, using a given plain color.- Specified by:
highlight_dataset
in interfaceDataAPI
- Parameters:
name
- The dataset name.color
- RGBA color as an array with 4 floats, each in [0,1].highlight
- State.- Returns:
- False if the dataset could not be found.
-
highlight_dataset
public boolean highlight_dataset(String name, String attr_name, String colmap, double min, double max, boolean highlight) Description copied from interface:DataAPI
Enable or disable the dataset highlight, using the given color map on the given attribute with the given maximum and minimum mapping values.- Specified by:
highlight_dataset
in interfaceDataAPI
- Parameters:
name
- The dataset name.attr_name
- The attribute name. You can use basic attributes (please mind the case!):- RA
- DEC
- Distance
- GalLatitude
- GalLongitude
- EclLatitude
- EclLongitude
- Mualpha
- Mudelta
- Radvel
- Absmag
- Appmag
colmap
- The color map to use, in ["reds"|"greens"|"blues"|"rainbow18"|"rainbow"|"seismic"|"carnation"|"hotmeal"|"cool"].min
- The minimum mapping value.max
- The maximum mapping value.highlight
- State.- Returns:
- False if the dataset could not be found.
-
set_dataset_highlight_size_factor
Description copied from interface:DataAPI
Set the size increase factor of this dataset when highlighted.- Specified by:
set_dataset_highlight_size_factor
in interfaceDataAPI
- Parameters:
name
- The dataset name.factor
- The size factor to apply to the particles when highlighted, must be in [Constants.MIN_DATASET_SIZE_FACTOR
,Constants.MAX_DATASET_SIZE_FACTOR
].- Returns:
- False if the dataset could not be found.
-
set_dataset_highlight_all_visible
Description copied from interface:DataAPI
Set the 'all visible' property of datasets when highlighted. If set to true, all stars in the dataset have an increased minimum opacity when highlighted, so that they are all visible. Otherwise, stars retain their minimum opacity and base brightness.- Specified by:
set_dataset_highlight_all_visible
in interfaceDataAPI
- Parameters:
name
- The dataset name.visible
- Whether all stars in the dataset should be visible when highlighted or not.- Returns:
- False if the dataset could not be found.
-
set_dataset_point_size_factor
Description copied from interface:DataAPI
Set the dataset point size multiplier.- Specified by:
set_dataset_point_size_factor
in interfaceDataAPI
- Parameters:
name
- The dataset name.multiplier
- The multiplier, as a positive floating point number.
-
list_datasets
Description copied from interface:DataAPI
Return the names of all datasets currently loaded.- Specified by:
list_datasets
in interfaceDataAPI
- Returns:
- A list with all the names of the loaded datasets.
-
notify
-