Class: ContoursFactoryGUI

ContoursFactoryGUI(viewer, relFITSFilePath)

A complete GUI to define the contours levels and trigger their drawing (see ContoursFactory) once they are defined. The GUI is implemented as a modal whose HTML content is defined in the constructor. It provides the user with :
  • an interactive graphic representation of the pixels values histogram
  • a text input area where contours levels numerical values can be entered/edited
  • a interactive graphic representation of the pixel values cumulative distribution
  • a text input area where quantiles can be entered/edited
Both graphics representations are clickable and can be used to define contours levels. Graphics are done with HighCharts

Constructor

new ContoursFactoryGUI(viewer, relFITSFilePath)

Creates an instance.
Parameters:
Name Type Description
viewer Viewer The Viewer that hosts the contours graphics representations.
relFITSFilePath string The path to the FITS file of interest.
Source:

Methods

clear()

Clear the contents of the GUI input elements
Source:

connect(contoursFactory)

Connect the GUI to a ContoursFactory
Parameters:
Name Type Description
contoursFactory ContoursFactory the instance of ContoursFactory where the contours will be drawn.
Source:

drawCumulativeDistribution()

Draw cumulative distribution.
Source:

drawHistogram()

Draw histogram
Source:

drawThings()

Draw everything, i.e. histogram and cumulative distribution
Source:

getContoursPromise(postParams) → {Array.<LineStringFeature>}

Promise. What has to be done to obtain the contours lines given their levels|quantiles.
Parameters:
Name Type Description
postParams ContoursPostParams
Source:
Returns:
Type
Array.<LineStringFeature>

hasLevelsDefined() → {boolean}

Checks if the levels input area has values (true) or not (false)
Source:
Returns:
Type
boolean

hasQuantilesDefined() → {boolean}

Checks if the quantiles input area has values (true) or not (false)
Source:
Returns:
Type
boolean

parseTextOfLevels() → {Array.<number>|false}

Parse the content of the levels text input area into an array of numbers
Source:
Returns:
Type
Array.<number> | false

parseTextOfQuantiles() → {Array.<number>|false}

Parse the content of the quantiles text input area into an array of numbers
Source:
Returns:
Type
Array.<number> | false

queryYAFITSContours(relFITSFilePath)

Obtain the contours lines corresponding to the choosen levels or quantiles and trigger their drawings performed by the connected instance of ContoursFactory.
Parameters:
Name Type Description
relFITSFilePath string The path to the FITS file of interest.
Source:

reset()

Reset the contents of the GUI input elements
Source: