Class: ImageHiPS

ImageHiPS(id, url, optionsopt)

new ImageHiPS(id, url, optionsopt)

Giving a CDS ID will do a query to the MOCServer first to retrieve metadata. Then it will also check for the presence of faster HiPS nodes to choose a faster url to query to tiles from.
Parameters:
Name Type Attributes Description
id string Mandatory unique identifier for the layer. Can be an arbitrary name
url string Can be an url to the survey or a "CDS" ID pointing towards a HiPS. One can found the list of IDs here
options ImageHiPSOptions <optional>
The option for the survey
Source:

Methods

getAvailableFormats() → {Array.<string>}

Sets the opacity factor when rendering the ImageHiPS
Source:
Returns:
Returns the formats accepted for the survey, i.e. the formats of tiles that are availables. Could be PNG, WEBP, JPG and FITS.
Type
Array.<string>

isPlanetaryBody() → {boolean}

Checks if the ImageHiPS represents a planetary body. This method returns a boolean indicating whether the ImageHiPS corresponds to a planetary body, e.g. the earth or a celestial body.
Source:
Returns:
Returns true if the ImageHiPS represents a planetary body; otherwise, returns false.
Type
boolean

setBlendingConfig(additiveopt)

Two rendering modes are availables i.e. the default one and the additive one. When rendering this survey on top of the already rendered ones, the final color of the screen is computed like:

opacity * this_survey_color + (1 - opacity) * already_rendered_color for the default mode
opacity * this_survey_color + already_rendered_color for the additive mode

Additive mode allows you to do linear survey color combination i.e. let's define 3 surveys named s1, s2, s3. Each could be associated to one color channel, i.e. s1 with red, s2 with green and s3 with the blue color channel. If the additive blending mode is enabled, then the final pixel color of your screen will be: rgb = [s1_opacity * s1_color; s2_opacity * s2_color; s3_opacity * s3_color]
Parameters:
Name Type Attributes Default Description
additive boolean <optional>
false -
Source:

setBrightness(brightness)

Sets the brightness for the ImageHiPS. This method updates the brightness of the ImageHiPS.
Parameters:
Name Type Description
brightness number The brightness value to set for the ImageHiPS. Between 0 and 1
Source:

setColormap(colormapopt, optionsopt)

Sets the colormap when rendering the ImageHiPS.
Parameters:
Name Type Attributes Default Description
colormap string <optional>
"grayscale" The colormap label to use. See here for more info about colormaps. Possible values are:
"blues"
"cividis"
"cubehelix"
"eosb"
"grayscale"
"inferno"
"magma"
"native"
"parula"
"plasma"
"rainbow"
"rdbu"
"rdylbu"
"redtemperature"
"sinebow"
"spectral"
"summer"
"viridis"
"ylgnbu"
"ylorbr"
"red"
"green"
"blue"
options Object <optional>
Options for the colormap
Properties
Name Type Attributes Default Description
stretch string <optional>
Stretching function of the colormap. Possible values are 'linear', 'asinh', 'log', 'sqrt', 'pow'. If no given, will not change it.
reversed boolean <optional>
false Reverse the colormap axis.
Source:

setContrast(contrast)

Sets the contrast for the ImageHiPS. This method updates the contrast of the ImageHiPS and triggers the update of metadata.
Parameters:
Name Type Description
contrast number The contrast value to set for the ImageHiPS. Between 0 and 1
Source:

setCuts(lowCut, highCut)

Sets the gamma correction factor for the ImageHiPS. This method updates the gamma of the ImageHiPS.
Parameters:
Name Type Description
lowCut number The low cut value to set for the ImageHiPS.
highCut number The high cut value to set for the ImageHiPS.
Source:

setGamma(gamma)

Sets the gamma correction factor for the ImageHiPS. This method updates the gamma of the ImageHiPS.
Parameters:
Name Type Description
gamma number The saturation value to set for the ImageHiPS. Between 0.1 and 10
Source:

setImageFormat(format)

Sets the image format for the ImageHiPS. This method updates the image format of the ImageHiPS, performs format validation, and triggers the update of metadata.
Parameters:
Name Type Description
format string The desired image format. Should be one of ["fits", "png", "jpg", "webp"].
Source:
Throws:
Throws an error if the provided format is not one of the supported formats or if the format is not available for the specific ImageHiPS.
Type
string

setOpacity(opacity)

Sets the opacity factor when rendering the ImageHiPS
Parameters:
Name Type Description
opacity number Opacity of the survey to set. Between 0 and 1
Source:

setSaturation(saturation)

Sets the saturation for the ImageHiPS. This method updates the saturation of the ImageHiPS.
Parameters:
Name Type Description
saturation number The saturation value to set for the ImageHiPS. Between 0 and 1
Source: