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. |
Methods
clear()
Clear the contents of the GUI input elements
connect(contoursFactory)
Connect the GUI to a ContoursFactory
Parameters:
Name | Type | Description |
---|---|---|
contoursFactory |
ContoursFactory | the instance of ContoursFactory where the contours will be drawn. |
drawCumulativeDistribution()
Draw cumulative distribution.
drawHistogram()
Draw histogram
drawThings()
Draw everything, i.e. histogram and cumulative distribution
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 |
Returns:
- Type
- Array.<LineStringFeature>
hasLevelsDefined() → {boolean}
Checks if the levels input area has values (true) or not (false)
Returns:
- Type
- boolean
hasQuantilesDefined() → {boolean}
Checks if the quantiles input area has values (true) or not (false)
Returns:
- Type
- boolean
parseTextOfLevels() → {Array.<number>|false}
Parse the content of the levels text input area into an array of numbers
Returns:
- Type
- Array.<number> | false
parseTextOfQuantiles() → {Array.<number>|false}
Parse the content of the quantiles text input area into an array of numbers
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. |
reset()
Reset the contents of the GUI input elements