cassis.gui.plot.tools
public class ToolsModel extends ListenerManager implements ToolsModelsInterface
| Constructor and Description |
|---|
ToolsModel(ToolsInterface anInterface,
int aNumPlot)
Constructor of the ToolsModel.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
doAverage(java.lang.String serieName,
java.lang.String serie2Name)
Create a new serie by adding the values of two series then dividing them by 2.
|
boolean |
doAverage(java.lang.String serieName,
java.lang.String serie2Name,
double xMin,
double xMax,
double sampling)
Create a new serie by adding the values of two serie then dividing them by 2.
|
boolean |
doAverage(java.lang.String serieName,
java.lang.String serie2Name,
java.lang.String nameNewCurve,
int number,
java.awt.Color color)
Retrieves
XYSpectrumSeries corresponding to series names given then call
doAverage(XYSpectrumSeries, XYSpectrumSeries, String, int, Color) |
boolean |
doOperation(java.lang.String serieName,
java.lang.String serie2Name,
double xMin,
double xMax,
double sampling,
Operation operation)
Create a new serie by doing an operation between two series (ADD, SUBTRACT or DIVIDE).
|
boolean |
doOperation(java.lang.String serieName,
java.lang.String serie2Name,
Operation operation)
Create a new serie by doing an operation between two series (ADD, SUBTRACT or DIVIDE).
|
boolean |
doOperation(java.lang.String serieName,
java.lang.String serie2Name,
java.lang.String nameNewCurve,
int number,
java.util.List<java.awt.Color> newColors,
Operation operation)
Retrieves
XYSpectrumSeries corresponding to series names given then call
doOperation(XYSpectrumSeries, XYSpectrumSeries, String, int, List, Operation). |
boolean |
doOperationWithAValue(java.lang.String serieName,
java.lang.Double value,
Operation operation)
Create a new serie by doing an operation between a serie and a Double value.
|
boolean |
doOperationWithAValue(java.lang.String serieName,
java.lang.Double value,
java.lang.String nameNewCurve,
java.awt.Color newColor,
Operation operation)
Retrieves
XYSpectrumSeries corresponding to serie names given then call
doOperationWithAValue(XYSpectrumSeries, Double, String, Color, Operation)} |
boolean |
doOperationWithOneSpectrum(java.lang.String serieName,
Operation operation)
Create a new serie by doing an operation with only a serie.
|
boolean |
doOperationWithOneSpectrum(java.lang.String serieName,
java.lang.String nameNewCurve,
java.awt.Color color,
Operation operation)
Retrieves
XYSpectrumSeries corresponding to the series name given then call
doOperationWithOneSpectrum(XYSpectrumSeries, String, Color, Operation) |
boolean |
doSmoothBox(java.lang.String serieName,
int boxSize)
Create a new serie by doing a Smooth Box operation.
|
boolean |
doSmoothBox(java.lang.String serieName,
java.lang.String nameNewCurve,
int boxSize,
java.awt.Color color)
Retrieves
XYSpectrumSeries corresponding to serie name given then call
doSmoothBox(XYSpectrumSeries, String, int, Color). |
boolean |
doTmbTaChange(java.lang.String serieName,
Operation operation,
java.util.List<java.lang.Double> efficiencyList,
java.util.List<java.lang.Double> frequencyList)
Create a new serie by doing a change with tmb/ta.
|
boolean |
doTmbTaChange(java.lang.String serieName,
java.lang.String nameNewCurve,
java.awt.Color color,
Operation operation,
java.util.List<java.lang.Double> efficiencyList,
java.util.List<java.lang.Double> frequencyList)
Retrieves
XYSpectrumSeries corresponding to serie name given then call
ToolsModel#doTmbToTaChange(XYSpectrumSeries, String, Color, ArrayList, ArrayList, Operation). |
Operation |
getActionSelected() |
boolean |
getAdvancedSmoothHanningState() |
boolean |
getAdvancedSubtractState() |
java.util.List<java.lang.String> |
getAllCurveOfType(TypeFrequency type) |
java.util.List<java.lang.String> |
getCurveAllName() |
XYSpectrumSeries |
getCurveByName(int numList,
java.lang.String name)
Get an
XYSpectrumSeries by his name. |
java.util.List<java.lang.String> |
getCurveOneName() |
java.util.List<java.lang.String> |
getCurveTwoName() |
java.lang.String |
getSelectedSpectrumAll() |
java.lang.String |
getSelectedSpectrumOne() |
java.lang.String |
getSelectedSpectrumRest() |
java.lang.String |
getSelectedSpectrumSky() |
java.lang.String |
getSelectedSpectrumTwo() |
TelescopeModel |
getTelescopeModel() |
ViewType |
getViewType()
Return the ViewType.
|
XAxisCassis |
getXAxisCassis()
Return the current XAxisCassis.
|
boolean |
isAdvancedParametersTwoSpectrumAllowed() |
boolean |
isAdvancedSmoothHanningAllowed() |
void |
setActionSelected(Operation actionSelected)
Change the selected action.
|
void |
setAdvancedSmoothHanningState(boolean newState)
Change the state of the advanced Smooth Hanning panel.
|
void |
setAdvancedSubtractState(boolean newState)
Change the state of the advanced subtract panel.
|
void |
setSelectedSpectrumAll(java.lang.String selectedSpectrumAll)
Change only on model the selected spectrum "all".
|
void |
setSelectedSpectrumOne(java.lang.String selectedSpectrumOne)
Change only on model the selected spectrum one.
|
void |
setSelectedSpectrumRest(java.lang.String selectedSpectrumRest)
Change only on model the selected spectrum "rest"
|
void |
setSelectedSpectrumSky(java.lang.String selectedSpectrumSky)
Change only on model the selected spectrum "sky".
|
void |
setSelectedSpectrumTwo(java.lang.String selectedSpectrumTwo)
Change only on model the selected spectrum two.
|
boolean |
smoothHanning(java.lang.String serieName,
int iterationNumber)
Do a Smooth Hanning on a serie.
|
boolean |
smoothHanning(java.lang.String serieName,
java.lang.String genericName,
int actualNumber,
int iterationNumber,
java.awt.Color color)
Retrieves
XYSpectrumSeries corresponding to serie name given then call
smoothHanning(XYSpectrumSeries, String, int, int, Color, boolean). |
addModelListener, clone, fireDataChanged, removeAllListener, removeModelListenerpublic ToolsModel(ToolsInterface anInterface, int aNumPlot)
anInterface - The class who implements the ToolsInterface.aNumPlot - The number of the plot in the Mosaic.public java.util.List<java.lang.String> getCurveOneName()
getCurveOneName in interface ToolsModelsInterfacepublic java.util.List<java.lang.String> getCurveTwoName()
getCurveTwoName in interface ToolsModelsInterfacepublic java.util.List<java.lang.String> getCurveAllName()
getCurveAllName in interface ToolsModelsInterfacepublic boolean doOperation(java.lang.String serieName,
java.lang.String serie2Name,
Operation operation)
ToolsModelsInterfacedoOperation in interface ToolsModelsInterfaceserieName - The name of the first serie. (This is the serie whose data will be subtracted in case of SUBTRACT operation.)serie2Name - The name of the second serie. (This is the serie used to subtract in case of SUBTRACT operation.)operation - The operation to do. It must be Operation.ADD, Operation.SUBTRACT or Operation.DIVIDE.public boolean doOperation(java.lang.String serieName,
java.lang.String serie2Name,
java.lang.String nameNewCurve,
int number,
java.util.List<java.awt.Color> newColors,
Operation operation)
XYSpectrumSeries corresponding to series names given then call
doOperation(XYSpectrumSeries, XYSpectrumSeries, String, int, List, Operation).serieName - The name of the first XYSpectrumSeries (whose data will be subtracted in case of SUBTRACT operation).serie2Name - The name of the second XYSpectrumSeries (used to subtract in case of SUBTRACT operation).nameNewCurve - The generic name of the created XYSpectrumSeries.number - The number used for the news series.newColors - The Colors used for the three new XYSpectrumSeries.operation - The operation to do. It must be Operation.ADD, Operation.SUBTRACT or Operation.DIVIDE.public XYSpectrumSeries getCurveByName(int numList, java.lang.String name)
XYSpectrumSeries by his name.numList - The number of the method where we have to look for the XYSpectrumSeries.name - The name of the XYSpectrumSeries.XYSpectrumSeries found or null.public Operation getActionSelected()
getActionSelected in interface ToolsModelsInterfacepublic void setActionSelected(Operation actionSelected)
ToolsModelsInterfacesetActionSelected in interface ToolsModelsInterfaceactionSelected - The new selected action.public boolean doOperationWithAValue(java.lang.String serieName,
java.lang.Double value,
Operation operation)
ToolsModelsInterfacedoOperationWithAValue in interface ToolsModelsInterfaceserieName - The name of the serie.value - The Double value.operation - The operation to do. It must be Operation.ADD_CONSTANT,
Operation.MULTIPLY_CONSTANT, Operation.RESAMPLE, Operation.FREQUENCY_FRAME,
Operation.VLSR, Operation.SKY_TO_REST or Operation.SMOOTH_GAUSS.public boolean doOperationWithAValue(java.lang.String serieName,
java.lang.Double value,
java.lang.String nameNewCurve,
java.awt.Color newColor,
Operation operation)
XYSpectrumSeries corresponding to serie names given then call
doOperationWithAValue(XYSpectrumSeries, Double, String, Color, Operation)}serieName - The name of the XYSpectrumSeries.value - The Double value used for the operation.nameNewCurve - The name of the created XYSpectrumSeries.newColor - The Color used for the new XYSpectrumSeries.operation - The operation to do. It must be Operation.ADD_CONSTANT,
Operation.MULTIPLY_CONSTANT, Operation.RESAMPLE, Operation.FREQUENCY_FRAME,
Operation.VLSR or Operation.SKY_TO_REST.public boolean smoothHanning(java.lang.String serieName,
int iterationNumber)
ToolsModelsInterfacesmoothHanning in interface ToolsModelsInterfaceserieName - The name of the serie on which we want to do a Smooth Haning.iterationNumber - The number of iterations.public boolean smoothHanning(java.lang.String serieName,
java.lang.String genericName,
int actualNumber,
int iterationNumber,
java.awt.Color color)
XYSpectrumSeries corresponding to serie name given then call
smoothHanning(XYSpectrumSeries, String, int, int, Color, boolean).serieName - The name of the XYSpectrumSeries who will be smoothed.genericName - The generic name for the created serie (which is the name without the number).actualNumber - The current id of Smooth Hanning.iterationNumber - The number of iterations.color - The color used for the serie.public boolean isAdvancedParametersTwoSpectrumAllowed()
isAdvancedParametersTwoSpectrumAllowed in interface ToolsModelsInterfacepublic boolean isAdvancedSmoothHanningAllowed()
isAdvancedSmoothHanningAllowed in interface ToolsModelsInterfacepublic boolean getAdvancedSubtractState()
getAdvancedSubtractState in interface ToolsModelsInterfacepublic boolean getAdvancedSmoothHanningState()
getAdvancedSmoothHanningState in interface ToolsModelsInterfacepublic void setAdvancedSmoothHanningState(boolean newState)
ToolsModelsInterfacesetAdvancedSmoothHanningState in interface ToolsModelsInterfacenewState - The new state.public void setAdvancedSubtractState(boolean newState)
ToolsModelsInterfacesetAdvancedSubtractState in interface ToolsModelsInterfacenewState - The new state.public boolean doOperation(java.lang.String serieName,
java.lang.String serie2Name,
double xMin,
double xMax,
double sampling,
Operation operation)
ToolsModelsInterfacedoOperation in interface ToolsModelsInterfaceserieName - The name of the first serie. (This is the serie whose data will be subtracted in case of SUBTRACT operation.)serie2Name - The name of the second serie. (This is the serie used to subtract in case of SUBTRACT operation.)xMin - The value of the minimum x point in the xAxis unit of the series.xMax - The value of the maximum x point in the xAxis unit of the series.sampling - The sampling used for the created XYSpectrumSeries in the xAxis unit of the series.operation - The operation to do. It must be Operation.ADD, Operation.SUBTRACT or Operation.DIVIDE.public boolean doAverage(java.lang.String serieName,
java.lang.String serie2Name)
ToolsModelsInterfacedoAverage in interface ToolsModelsInterfaceserieName - The name of the first serie.serie2Name - The name of the second serie.public boolean doAverage(java.lang.String serieName,
java.lang.String serie2Name,
java.lang.String nameNewCurve,
int number,
java.awt.Color color)
XYSpectrumSeries corresponding to series names given then call
doAverage(XYSpectrumSeries, XYSpectrumSeries, String, int, Color)serieName - The name of the first serie.serie2Name - The name of the second serie.nameNewCurve - The generic name of the created XYSpectrumSeries.number - The number used for the new serie.color - The Color used for the new XYSpectrumSeries.public boolean doAverage(java.lang.String serieName,
java.lang.String serie2Name,
double xMin,
double xMax,
double sampling)
ToolsModelsInterfacedoAverage in interface ToolsModelsInterfaceserieName - The name of the first serie.serie2Name - The name of the second serie.xMin - The value of the minimum x point in the xAxis unit of the series.xMax - The value of the maximum x point in the xAxis unit of the series.sampling - The sampling used for the created XYSpectrumSeries in the xAxis unit of the series.public java.util.List<java.lang.String> getAllCurveOfType(TypeFrequency type)
getAllCurveOfType in interface ToolsModelsInterfacetype - The Type of the curve.public boolean doOperationWithOneSpectrum(java.lang.String serieName,
Operation operation)
ToolsModelsInterfacedoOperationWithOneSpectrum in interface ToolsModelsInterfaceserieName - The name of the serie.operation - The operation to do. It must be Operation.REST_TO_SKY for now.public boolean doOperationWithOneSpectrum(java.lang.String serieName,
java.lang.String nameNewCurve,
java.awt.Color color,
Operation operation)
XYSpectrumSeries corresponding to the series name given then call
doOperationWithOneSpectrum(XYSpectrumSeries, String, Color, Operation)serieName - The name of the serie.nameNewCurve - The generic name of the created XYSpectrumSeries.color - The Color used for the new XYSpectrumSeries.operation - The operation to do. It must be Operation.REST_TO_SKY.public java.lang.String getSelectedSpectrumOne()
getSelectedSpectrumOne in interface ToolsModelsInterfacepublic void setSelectedSpectrumOne(java.lang.String selectedSpectrumOne)
ToolsModelsInterfacesetSelectedSpectrumOne in interface ToolsModelsInterfaceselectedSpectrumOne - The name of the selected spectrum one.public java.lang.String getSelectedSpectrumTwo()
getSelectedSpectrumTwo in interface ToolsModelsInterfacepublic void setSelectedSpectrumTwo(java.lang.String selectedSpectrumTwo)
ToolsModelsInterfacesetSelectedSpectrumTwo in interface ToolsModelsInterfaceselectedSpectrumTwo - The name of the selected spectrum two.public java.lang.String getSelectedSpectrumAll()
getSelectedSpectrumAll in interface ToolsModelsInterfacepublic void setSelectedSpectrumAll(java.lang.String selectedSpectrumAll)
ToolsModelsInterfacesetSelectedSpectrumAll in interface ToolsModelsInterfaceselectedSpectrumAll - The name of the selected spectrum "all.public java.lang.String getSelectedSpectrumRest()
getSelectedSpectrumRest in interface ToolsModelsInterfacepublic void setSelectedSpectrumRest(java.lang.String selectedSpectrumRest)
ToolsModelsInterfacesetSelectedSpectrumRest in interface ToolsModelsInterfaceselectedSpectrumRest - The name of the rest selected spectrum.public java.lang.String getSelectedSpectrumSky()
getSelectedSpectrumSky in interface ToolsModelsInterfacepublic void setSelectedSpectrumSky(java.lang.String selectedSpectrumSky)
ToolsModelsInterfacesetSelectedSpectrumSky in interface ToolsModelsInterfaceselectedSpectrumSky - The name of the sky selected spectrum.public TelescopeModel getTelescopeModel()
getTelescopeModel in interface ToolsModelsInterfacepublic boolean doTmbTaChange(java.lang.String serieName,
Operation operation,
java.util.List<java.lang.Double> efficiencyList,
java.util.List<java.lang.Double> frequencyList)
ToolsModelsInterfacedoTmbTaChange in interface ToolsModelsInterfaceserieName - The name of the serie used for the operation.operation - The operation to do. It must be Operation.TA_TO_TMB or Operation.TMB_TO_TA.efficiencyList - The efficiency list of the telescope.frequencyList - The frequency list of the telescope.public boolean doTmbTaChange(java.lang.String serieName,
java.lang.String nameNewCurve,
java.awt.Color color,
Operation operation,
java.util.List<java.lang.Double> efficiencyList,
java.util.List<java.lang.Double> frequencyList)
XYSpectrumSeries corresponding to serie name given then call
ToolsModel#doTmbToTaChange(XYSpectrumSeries, String, Color, ArrayList, ArrayList, Operation).serieName - The name of the XYSpectrumSeries who will be used for the Tmb/Ta change.nameNewCurve - The name of the new serie.color - The color used for the serie.operation - The operation todo. It must be Operation.TA_TO_TMB or Operation.TMB_TO_TA.efficiencyList - The efficiency list of the telescope.frequencyList - The frequency list of the telescope.public boolean doSmoothBox(java.lang.String serieName,
int boxSize)
ToolsModelsInterfacedoSmoothBox in interface ToolsModelsInterfaceserieName - The name of the serie used for the operation.boxSize - The box size used for the operation.public boolean doSmoothBox(java.lang.String serieName,
java.lang.String nameNewCurve,
int boxSize,
java.awt.Color color)
XYSpectrumSeries corresponding to serie name given then call
doSmoothBox(XYSpectrumSeries, String, int, Color).serieName - The name of the XYSpectrumSeries who will be smoothed.nameNewCurve - The name of the new serie.boxSize - The box size used for the operation.color - The color used for the serie.public ViewType getViewType()
ToolsModelsInterfacegetViewType in interface ToolsModelsInterfacepublic XAxisCassis getXAxisCassis()
ToolsModelsInterfacegetXAxisCassis in interface ToolsModelsInterface