Class DataModule

java.lang.Object
gaiasky.script.v2.impl.APIModule
gaiasky.script.v2.impl.DataModule
All Implemented Interfaces:
IObserver, DataAPI

public class DataModule extends APIModule implements IObserver, DataAPI
The data module provides calls and methods to handle datasets and catalogs.
  • Constructor Details Link icon

    • DataModule Link icon

      public DataModule(EventManager em, APIv2 api, String name)
      Create a new module with the given attributes.
      Parameters:
      api - Reference to the API class.
      name - Name of the module.
  • Method Details Link icon

    • get_datasets_directory Link icon

      public String 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 interface DataAPI
      Returns:
      The path to the current location used to store datasets.
    • load_dataset Link icon

      public boolean load_dataset(String name, String absolutePath)
      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 interface DataAPI
      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 Link icon

      public boolean load_dataset(String name, String path, 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.
      If sync is true, the call acts exactly like DataAPI.load_dataset(String, String).
      If sync is false, the loading happens in a new thread and the call returns immediately. In this case, you can use DataAPI.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 interface DataAPI
      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 Link icon

      public boolean load_dataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, boolean sync)
    • load_dataset Link icon

      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.
      If sync is true, the call acts exactly like DataAPI.load_dataset(String, String, boolean).
      If sync is false, the loading happens in a new thread and the call returns immediately. In this case, you can use DataAPI.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 interface DataAPI
      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 - The CatalogInfo.CatalogInfoSource object to use as the dataset type.
      datasetOptions - The DatasetOptions 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 Link icon

      public boolean load_dataset(String dsName, uk.ac.starlink.util.DataSource ds, CatalogInfo.CatalogInfoSource type, DatasetOptions datasetOptions, boolean sync)
    • load_star_dataset Link icon

      public boolean load_star_dataset(String name, String path, boolean sync)
      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.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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 Link icon

      public boolean load_star_dataset(String name, String path, double factor, boolean sync)
      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.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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 in appmag = 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 Link icon

      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.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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 in appmag = 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 Link icon

      public boolean load_star_dataset(String dsName, String path, double magnitudeScale, List<?> labelColor, boolean sync)
    • load_star_dataset Link icon

      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.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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 in appmag = 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 Link icon

      public boolean load_star_dataset(String dsName, String path, double magnitudeScale, List<?> labelColor, List<?> fadeIn, List<?> fadeOut, boolean sync)
    • load_star_dataset Link icon

      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 Link icon

      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.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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. (see ComponentTypes.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 Link icon

      public boolean load_particle_dataset(String dsName, String path, double profileDecay, List<?> particleColor, double colorNoise, List<?> labelColor, double particleSize, String ct, boolean sync)
    • load_particle_dataset Link icon

      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.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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. (see ComponentTypes.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 Link icon

      public 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)
    • load_particle_dataset Link icon

      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.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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. (see ComponentTypes.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 Link icon

      public 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)
    • load_particle_dataset Link icon

      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 Link icon

      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 Link icon

      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. If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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 Link icon

      public boolean load_star_cluster_dataset(String dsName, String path, List<?> particleColor, List<?> fadeIn, List<?> fadeOut, boolean sync)
    • load_star_cluster_dataset Link icon

      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. If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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 Link icon

      public boolean load_star_cluster_dataset(String dsName, String path, List<?> particleColor, List<?> labelColor, List<?> fadeIn, List<?> fadeOut, boolean sync)
    • load_star_cluster_dataset Link icon

      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. If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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 (see ComponentTypes.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 Link icon

      public boolean load_star_cluster_dataset(String dsName, String path, List<?> particleColor, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync)
    • load_star_cluster_dataset Link icon

      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. If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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 (see ComponentTypes.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 Link icon

      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 magnitudes
      • g_transit_mag: list of magnitudes corresponding to the times in g_transit_times
      • pf: the period in days
      The call can be made synchronous or asynchronous.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync 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 interface DataAPI
      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 in appmag = 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 Link icon

      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 Link icon

      public boolean load_star_cluster_dataset(String dsName, String path, List<?> particleColor, List<?> labelColor, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync)
    • load_json_dataset Link icon

      public boolean load_json_dataset(String name, String path)
      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 interface DataAPI
      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 Link icon

      public boolean load_json_dataset(String name, String pathString, boolean sync)
      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 interface DataAPI
      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 Link icon

      public boolean load_json_dataset(String name, String pathString, boolean select, boolean sync)
      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 interface DataAPI
      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 Link icon

      public boolean dataset_exists(String name)
      Description copied from interface: DataAPI
      Check whether the dataset identified by the given name is loaded
      Specified by:
      dataset_exists in interface DataAPI
      Parameters:
      name - The name of the dataset to query.
      Returns:
      True if the dataset is loaded, false otherwise.
    • set_dataset_transform_matrix Link icon

      public boolean set_dataset_transform_matrix(String name, double[] 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 interface DataAPI
      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 Link icon

      public boolean clear_dataset_transform_matrix(String name)
      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 interface DataAPI
      Parameters:
      name - The name of the dataset.
      Returns:
      True if the dataset was found and the transformations cleared.
    • remove_dataset Link icon

      public boolean remove_dataset(String name)
      Description copied from interface: DataAPI
      Remove the dataset identified by the given name, if it exists.
      Specified by:
      remove_dataset in interface DataAPI
      Parameters:
      name - The name of the dataset to remove.
      Returns:
      False if the dataset could not be found.
    • hide_dataset Link icon

      public boolean hide_dataset(String name)
      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 interface DataAPI
      Parameters:
      name - The name of the dataset to hide.
      Returns:
      False if the dataset could not be found.
    • show_dataset Link icon

      public boolean show_dataset(String name)
      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 interface DataAPI
      Parameters:
      name - The name of the dataset to show.
      Returns:
      False if the dataset could not be found.
    • highlight_dataset Link icon

      public boolean highlight_dataset(String name, boolean highlight)
      Description copied from interface: DataAPI
      Enable or disable the dataset highlight using a plain color chosen by the system.
      Specified by:
      highlight_dataset in interface DataAPI
      Parameters:
      name - The dataset name.
      highlight - State.
      Returns:
      False if the dataset could not be found.
    • highlight_dataset Link icon

      public boolean highlight_dataset(String name, int color_idx, boolean highlight)
      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 interface DataAPI
      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 Link icon

      public boolean highlight_dataset(String name, float[] color, boolean highlight)
      Description copied from interface: DataAPI
      Enable or disable the dataset highlight, using a given plain color.
      Specified by:
      highlight_dataset in interface DataAPI
      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 Link icon

      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 interface DataAPI
      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
      Or star-only attributes (if your dataset contains stars, mind the case!):
      • Mualpha
      • Mudelta
      • Radvel
      • Absmag
      • Appmag
      Or even extra attributes (if you loaded the dataset yourself), matching by column name.
      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 Link icon

      public boolean set_dataset_highlight_size_factor(String name, float factor)
      Description copied from interface: DataAPI
      Set the size increase factor of this dataset when highlighted.
      Specified by:
      set_dataset_highlight_size_factor in interface DataAPI
      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 Link icon

      public boolean set_dataset_highlight_all_visible(String name, boolean 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 interface DataAPI
      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 Link icon

      public void set_dataset_point_size_factor(String name, double multiplier)
      Description copied from interface: DataAPI
      Set the dataset point size multiplier.
      Specified by:
      set_dataset_point_size_factor in interface DataAPI
      Parameters:
      name - The dataset name.
      multiplier - The multiplier, as a positive floating point number.
    • list_datasets Link icon

      public List<String> list_datasets()
      Description copied from interface: DataAPI
      Return the names of all datasets currently loaded.
      Specified by:
      list_datasets in interface DataAPI
      Returns:
      A list with all the names of the loaded datasets.
    • notify Link icon

      public void notify(Event event, Object source, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      Parameters:
      event - The event type.
      source - The source object, if any.
      data - The data associated with this event.