Package csw.params.core.models
Class ExposureId$
java.lang.Object
csw.params.core.models.ExposureId$
Factory for ExposureId instances and helper functions.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ExposureId$
Static reference to the singleton instance of this Scala object. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapply
(ObsId obsId, Subsystem subsystem, String det, TYPLevel typLevel, ExposureNumber exposureNumber) This creates an ExposureId with an ObsId.apply
(Subsystem subsystem, String det, TYPLevel typLevel, ExposureNumber exposureNumber) This creates a stand-alone ExposureId for the case when there is noObsId
available.Create an ExposureId from a String of the 4 forms with and without an ObsId and with and without a subarray: IRIS-IMG-SCI0-0001,IRIS-IMG-SCI0-0001-02 when no ObsId is present.fromString
(String exposureId) A helper function that allows creating exposure id from string in java file.nextExposureNumber
(ExposureId exposureId) A convenience function to create a new ExposureId with the next higher exposure number.nextSubArrayNumber
(ExposureId exposureId) A convenience function to create a new ExposureId with the next higher sub array number.utcAsStandaloneString
(UTCTime utcTime) The UTC time formatted as needed for a standalone ExposureId: YYYYMMDD-HHMMSS.withExposureNumber
(ExposureId exposureId, int exposureNumber) A convenience function to create a new ExposureId with a specific exposure number.withObsId
(ExposureId exposureId, ObsId obsId) A convenience function to create a new ExposureId with a new ObsId object.withObsId
(ExposureId exposureId, String obsIdString) A convenience function to create a new ExposureId with a new ObsId as a String.withSubArrayNumber
(ExposureId exposureId, int subArrayNumber) A convenience function to create a new ExposureId with the same exposure number and specified sub array number Example: 2020A-001-123-WFOS-IMG1-SCI0-0001, 3 => 2020A-001-123-WFOS-IMG1-SCI0-0002-03.withUTC
(ExposureId exposureId, UTCTime utc) A convenience function that allows creating a standalone ExposureId at a specific UTC date and time.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
ExposureId$
public ExposureId$()
-
-
Method Details
-
withExposureNumber
A convenience function to create a new ExposureId with a specific exposure number. Example: 2020A-001-123-WFOS-IMG1-SCI0-0001 with 3 => 2020A-001-123-WFOS-IMG1-SCI0-0003- Parameters:
exposureId
- current ExposureIdexposureNumber
- desired exposure number- Returns:
- ExposureId with specified exposure number
-
nextExposureNumber
A convenience function to create a new ExposureId with the next higher exposure number. Example: 2020A-001-123-WFOS-IMG1-SCI0-0001 => 2020A-001-123-WFOS-IMG1-SCI0-0002- Parameters:
exposureId
- current ExposureId- Returns:
- ExposureId with next higher exposure number
-
withSubArrayNumber
A convenience function to create a new ExposureId with the same exposure number and specified sub array number Example: 2020A-001-123-WFOS-IMG1-SCI0-0001, 3 => 2020A-001-123-WFOS-IMG1-SCI0-0002-03. Example: 2020A-001-123-WFOS-IMG1-SCI0-0002-00, 4 => 2020A-001-123-WFOS-IMG1-SCI0-0002-04.- Parameters:
exposureId
- current ExposureIdsubArrayNumber
- specified subArray number- Returns:
- ExposureId with next higher ExposureNumber
-
nextSubArrayNumber
A convenience function to create a new ExposureId with the next higher sub array number. Example: 2020A-001-123-WFOS-IMG1-SCI0-0001 => 2020A-001-123-WFOS-IMG1-SCI0-0002-00. Example: 2020A-001-123-WFOS-IMG1-SCI0-0002-00 => 2020A-001-123-WFOS-IMG1-SCI0-0002-01.- Parameters:
exposureId
- current ExposureId- Returns:
- ExposureId with next higher ExposureNumber
-
withObsId
A convenience function to create a new ExposureId with a new ObsId object. Example: 2020A-001-123-WFOS-IMG1-SCI0-0001 => 2020A-001-228-WFOS-IMG1-SCI0-0001. Note that a standalone ExposureId will be changed to an ExposureId with an ObsId- Parameters:
exposureId
- current ExposureIdobsId
- new ObsId as anObsId
- Returns:
- a new ExposureId with given new ObsId
-
withObsId
A convenience function to create a new ExposureId with a new ObsId as a String. Example: 2020A-001-123-WFOS-IMG1-SCI0-0001 => 2020A-001-228-WFOS-IMG1-SCI0-0001. Note that a standalone ExposureId will be changed to an ExposureId with an ObsId.- Parameters:
exposureId
- current ExposureIdobsIdString
- new ObsId as a String- Returns:
- ExposureId with given new
ObsId
-
withUTC
A convenience function that allows creating a standalone ExposureId at a specific UTC date and time. Note than an ExposureId with an ObsId can be changed to a standalone ExposureId.- Parameters:
exposureId
- current ExposureIdutc
- aUTCTime
for the ExposureId- Returns:
- a standalone ExposureId at the provided UTC
-
utcAsStandaloneString
The UTC time formatted as needed for a standalone ExposureId: YYYYMMDD-HHMMSS.- Parameters:
utcTime
- (undocumented)- Returns:
- the UTCTime formatted String
-
fromString
A helper function that allows creating exposure id from string in java file.- Parameters:
exposureId
- proper ExposureId as a String- Returns:
- instance of ExposureId
-
apply
Create an ExposureId from a String of the 4 forms with and without an ObsId and with and without a subarray: IRIS-IMG-SCI0-0001,IRIS-IMG-SCI0-0001-02 when no ObsId is present. Or 2020A-001-123-IRIS-IMG-SCI0-0001 or 2020A-001-123-IRIS-IMG-SCI0-0001-02 when an ObsId is present.- Parameters:
exposureId
- proper ExposureId as a String- Returns:
- instance of ExposureId
- Throws:
IllegalArgumentException
- if the String does not follow the correct structure
-
apply
public ExposureId apply(Subsystem subsystem, String det, TYPLevel typLevel, ExposureNumber exposureNumber) This creates a stand-alone ExposureId for the case when there is noObsId
available.- Parameters:
subsystem
-Subsystem
associated with exposuredet
- a valid detector StringtypLevel
- the exposure'sTYPLevel
exposureNumber
- the exposure's Exposure NumberExposureNumber
- Returns:
- A stand-alone ExposureId
-
apply
public ExposureId apply(ObsId obsId, Subsystem subsystem, String det, TYPLevel typLevel, ExposureNumber exposureNumber) This creates an ExposureId with an ObsId.- Parameters:
obsId
- a validObsId
subsystem
-Subsystem
associated with exposuredet
- a valid detector StringtypLevel
- the exposure'sTYPLevel
exposureNumber
- the exposure's Exposure NumberExposureNumber
- Returns:
- A standalone ExposureId
-