Package cds.moc
Class STMoc
java.lang.Object
cds.moc.Moc
cds.moc.Moc2D
cds.moc.STMoc
- All Implemented Interfaces:
Cloneable,Comparable<Moc>,Iterable<MocCell>
The STMoc class implements the methods specific to spatial temporal MOCs.
See: IVOA MOC 2.0 standard => https://www.ivoa.net/documents/MOC/
-
Field Summary
Fields inherited from class cds.moc.Moc
ASCII, cacheDeepestOrder, cacheHashCode, cacheNbCells, comment, COMPRESS_SINGLETON, CR, FITS, JSON, LOGIC_MAX, LOGIC_MIN, MASK_COMP, MAXSIZE, MAXWORD, property, RAW, unites, UNMASK_COMP, VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidadd(int order, long npix, double jdmin, double jdmax) Adding one élément by spaceOrder/npix et [jdmin..jdmax]voidadd(long tmin, long tmax, long smin, long smax) voidadd(HealpixImpl healpix, double alpha, double delta, double jdmin, double jdmax) STMoc specifical methodsprotected static STMocCreate a STMoc from any kind of MOC by adding full space or time coverage if required WARNING: it is not a copy, may share data from the original Mocvoidclear()Clear the MOC - data only (not the properties, nor the mocOrder)clone()Clone Moc (deep copy)protected voidDeep copy.protected longcodeDim1(long a) Return the complementbooleancontains(long npix, double jd) True if the npix (deepest level) and jd date is in the STMocprotected longdecodeDim1(long a) protected longdecodeTime(long a) dup()Create and instance of same class, same sys, but no data nor mocorderlonggetMem()Return approximatively the amount of memory used for storing this MOC in RAM (in bytes)SMoc covering the whole STMOCgetSpaceMoc(long tmin, long tmax) SMoc extraction from a temporal timeintGet space orderGet the Coosys.doubleReturn maximal time in JD - -1 if emptydoubleReturn minimal time in JD - -1 if emptyTMoc covering from the whole STMOCgetTimeMoc(SMoc spaceMoc) TMoc from the intersection with the spaceMocintGet time orderintGet the Timesysintersection(Moc moc) Return the Intersection with another Mocprotected booleanisCodedDim1(long a) protected booleanisCodedTime(long a) booleanisIncluding(Moc moc) OperationsbooleanisIntersecting(Moc moc) protected voidreadSpecificData(InputStream in, int naxis1, int naxis2, int nbyte, cds.moc.Moc.HeaderFits header) Internal method: read FITS data according to the type of MOC.protected voidRecalculates the metrics associated with the MOC hierarchical view: the number of hierarchical cells, the deepest order used...voidsetSpaceOrder(int spaceOrder) Set space order [0..29]voidsetSpaceSys(String coosys) Set alternative Coosys.voidsetTimeOrder(int timeOrder) Set time order [0..61]voidsetTimeSys(String timesys) Set alternative Timesys.subtraction(Moc moc) Return the subtraction with another MocReturn the Union with another Mocprotected intWrite specifical STMOC propertiesMethods inherited from class cds.moc.Moc2D
add, add, add, addToken, cDim1, cDim2, cellIterator, codeTime, computeHierarchy, equals, flush, getCoverage, getEnd1, getEnd2, getMocOrder1, getMocOrder2, getNbCoding, getNbRanges, getStart1, getStart2, hashCode, isCompatible, isEmpty, isFull, lowAscii, maxOrder1, maxOrder2, operation, readSpecificDataRange, reduction, reduction, seeRangeList, setMocOrder, setMocOrder1, setMocOrder2, setRangeList, shiftOrder1, shiftOrder2, sizeOfCoding, toDebug, writeASCII, writeJSON, writeSpecificDataRangeMethods inherited from class cds.moc.Moc
accretion, add, bufferSize, codeComp, compareTo, compressRange, createMoc, createMoc, decodeComp, difference, getBourrage, getComment, getDeepestOrder, getFitsLine, getFitsLine, getMocOrder4op, getMocOrderLogic, getNbCells, getProperty, getPropertyKeys, getSpaceTimeMoc, getUnitDisk, getUnitDisk, hpix2uniq, isCodedComp, isSpace, isTime, iterator, json2ASCII, log2, pow2, read, read, read, readASCII, readFITS, readFully, readFully, readJSON, readLong, setMocOrderLogic, setProperty, setProperty, toASCII, toJSON, toString, uncompressRange, uncompressRange, uniq2hpix, uniq2hpix, write, write, write, write, writeASCII, writeASCII, writeASCIIFlush, writeData, writeFITS, writeFITS, writeJSON, writeSpecificData, writeValMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
STMoc
public STMoc()STMoc creator -
STMoc
STMoc creator- Parameters:
timeOrder- MocOrder for time dimension [0..61]spaceOrder- MocOrder for space dimension [0..29]- Throws:
Exception
-
STMoc
STMoc creator- Parameters:
s- String containing a STMOC (ASCII, JSON)- Throws:
Exception
-
STMoc
STMoc creator- Parameters:
in- Input stream containing a STMOC (ASCII, JSON or FITS)- Throws:
Exception
-
STMoc
STMoc creator from one TMOC and one SMOC- Parameters:
tmoc-smoc-- Throws:
Exception
-
-
Method Details
-
asSTMoc
Create a STMoc from any kind of MOC by adding full space or time coverage if required WARNING: it is not a copy, may share data from the original Moc- Throws:
Exception
-
clone
Clone Moc (deep copy)- Specified by:
clonein classMoc- Throws:
CloneNotSupportedException
-
clone1
Deep copy. The source is this, the target is the Moc in parameter- Overrides:
clone1in classMoc2D- Throws:
CloneNotSupportedException
-
dup
Create and instance of same class, same sys, but no data nor mocorder -
clear
public void clear()Clear the MOC - data only (not the properties, nor the mocOrder) -
resetCache
protected void resetCache()Description copied from class:MocRecalculates the metrics associated with the MOC hierarchical view: the number of hierarchical cells, the deepest order used...- Overrides:
resetCachein classMoc
-
getMem
public long getMem()Return approximatively the amount of memory used for storing this MOC in RAM (in bytes) -
add
public void add(HealpixImpl healpix, double alpha, double delta, double jdmin, double jdmax) throws Exception STMoc specifical methods- Throws:
Exception
-
add
Adding one élément by spaceOrder/npix et [jdmin..jdmax]- Throws:
Exception
-
add
- Throws:
Exception
-
add
- Throws:
Exception
-
setTimeOrder
Set time order [0..61]- Overrides:
setTimeOrderin classMoc- Throws:
Exception
-
setSpaceOrder
Set space order [0..29]- Overrides:
setSpaceOrderin classMoc- Throws:
Exception
-
getTimeOrder
public int getTimeOrder()Get time order- Overrides:
getTimeOrderin classMoc
-
getSpaceOrder
public int getSpaceOrder()Get space order- Overrides:
getSpaceOrderin classMoc
-
setSpaceSys
Set alternative Coosys. All celestial SMoc must be expressed in ICRS (see IVOA MOC 2.0) but alternative is possible for other sphere coverage notably the planets- Overrides:
setSpaceSysin classMoc- Parameters:
coosys- alternative coosys keyword (not standardized in IVOA document)
-
getSpaceSys
Get the Coosys. See setSpaceSys()- Overrides:
getSpaceSysin classMoc
-
setTimeSys
Set alternative Timesys. All celestial STMOC must be expressed in TCD (see IVOA MOC 2.0) but alternative is possible for other coverage notably the planets- Overrides:
setTimeSysin classMoc- Parameters:
sys- alternative timesys keyword (not standardized in IVOA document)
-
getTimeSys
Get the Timesys- Overrides:
getTimeSysin classMoc
-
getTimeMin
public double getTimeMin()Return minimal time in JD - -1 if empty -
getTimeMax
public double getTimeMax()Return maximal time in JD - -1 if empty -
getTimeRanges
public int getTimeRanges() -
getTimeMoc
TMoc covering from the whole STMOC- Overrides:
getTimeMocin classMoc- Throws:
Exception
-
getTimeMoc
TMoc from the intersection with the spaceMoc- Throws:
Exception
-
getSpaceMoc
SMoc covering the whole STMOC- Overrides:
getSpaceMocin classMoc- Throws:
Exception
-
getSpaceMoc
SMoc extraction from a temporal time- Parameters:
tmin- min of range (order 61)tmax- max of range (included - order 61)- Throws:
Exception
-
contains
public boolean contains(long npix, double jd) True if the npix (deepest level) and jd date is in the STMoc -
isIncluding
Operations- Specified by:
isIncludingin classMoc- Throws:
Exception
-
isIntersecting
- Specified by:
isIntersectingin classMoc- Throws:
Exception
-
union
Return the Union with another Moc -
subtraction
Return the subtraction with another Moc- Overrides:
subtractionin classMoc- Throws:
Exception
-
intersection
Return the Intersection with another Moc- Overrides:
intersectionin classMoc- Throws:
Exception
-
complement
Return the complement- Specified by:
complementin classMoc- Throws:
Exception
-
writeSpecificFitsProp
Write specifical STMOC properties- Specified by:
writeSpecificFitsPropin classMoc- Throws:
Exception
-
codeDim1
protected long codeDim1(long a) -
readSpecificData
protected void readSpecificData(InputStream in, int naxis1, int naxis2, int nbyte, cds.moc.Moc.HeaderFits header) throws Exception Internal method: read FITS data according to the type of MOC.- Specified by:
readSpecificDatain classMoc- Parameters:
in- The input streamnaxis1- size of FITS row (in bytes) (generally ==nbyte, but may be 1024 for buffering)naxis2- number of valuesnbyte- size of each value (in bytes)header- HDU1 header- Throws:
Exception
-
isCodedTime
protected boolean isCodedTime(long a) - Overrides:
isCodedTimein classMoc2D
-
decodeTime
protected long decodeTime(long a) - Overrides:
decodeTimein classMoc2D
-
isCodedDim1
protected boolean isCodedDim1(long a) - Specified by:
isCodedDim1in classMoc2D
-
decodeDim1
protected long decodeDim1(long a) - Specified by:
decodeDim1in classMoc2D
-