Package cds.moc
Class MocIO
java.lang.Object
cds.moc.MocIO
HEALPix Multi Order Coverage Map (MOC) IO routines
Compliante with IVOA MOC Rec 1.0 June 2014
Example : HealpixMoc moc = new HealpixMoc();
(new IO(moc).read(String filename);
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateUniq(int nval, int nbyte, byte[] t) voidread(InputStream in) Read HEALPix MOC from a stream.voidread(InputStream in, int mode) Deprecated.see read(InputStream)voidRead HEALPix MOC from a file.voidDeprecated.see read(String)voidreadASCII(InputStream in) Read MOC from an ASCII stream Support simultaneously various ASCII formats (OBSOLETE, ASCII invalid input: '&' JSON) ASCII (with a first comment for providing the MOCORDER) #MOCORDER MAX ORDER1/nn1,nn2-nnX ORDER2/...voidreadFits(InputStream in) Read HEALPix MOC from an Binary FITS streamvoidwrite(OutputStream out) Write HEALPix MOC to an output streamvoidwrite(OutputStream out, int mode) Write HEALPix MOC to an output stream At the end, the stream is not closedvoidWrite HEALPix MOC to a filevoidWrite HEALPix MOC to a filevoidwriteASCII(OutputStream out) Write HEALPix MOC to an output stream IN ASCII encoded formatvoidwriteFits(OutputStream out) Write HEALPix MOC to an output stream in FITS encoded formatvoidwriteJSON(OutputStream out) Write HEALPix MOC to an output stream IN JSON encoded format
-
Field Details
-
FITS
public static final int FITS- See Also:
-
JSON
public static final int JSON- See Also:
-
ASCII
public static final int ASCII- See Also:
-
JSON0
public static final int JSON0- See Also:
-
OLDSIGNATURE
- See Also:
-
SIGNATURE
- See Also:
-
-
Constructor Details
-
MocIO
-
-
Method Details
-
read
Read HEALPix MOC from a file. Support standard FITS format and ASCII non standard alternatives (JSON, ASCII)- Parameters:
filename- file name- Throws:
Exception
-
read
Deprecated.see read(String)Read HEALPix MOC from a file.- Parameters:
filename- file namemode- MOC format: FITS, JSON, ASCII- Throws:
Exception
-
read
Read HEALPix MOC from a stream. Support standard FITS format and ASCII non standard alternatives (JSON, ASCII)- Parameters:
in- input stream- Throws:
Exception
-
read
Deprecated.see read(InputStream)Read HEALPix MOC from a stream.- Parameters:
in- input streammode- MOC format: FITS, JSON, ASCII- Throws:
Exception
-
readASCII
Read MOC from an ASCII stream Support simultaneously various ASCII formats (OBSOLETE, ASCII invalid input: '&' JSON) ASCII (with a first comment for providing the MOCORDER) #MOCORDER MAX ORDER1/nn1,nn2-nnX ORDER2/... ASCII (with an explicit MAXORDER possibly empty list) ORDER1/nn1,nn2-nnX ORDER2/... MAXORDER/ JSON (with an explicit MAXORDER possibly empty list) {"ORDER1":[nn1,nn2,...], "ORDER2":[nn...] ... "MAXORDER":[] } OBSOLETE JSON (with a first comment for providing the MOCORDER => Not well formed JSON) #MOCORDER MAX {"ORDER1":[nn1,nn2,...], "ORDER2":[nn ... } OBSOLETE ASCII #MOCORDER MAX ORDER|NSIDE=xxx1 nn1 nn2-nn3 nn4 ... NSIDE|ORDER=xxx2 ...- Parameters:
in- input stream- Throws:
Exception
-
readFits
Read HEALPix MOC from an Binary FITS stream- Throws:
Exception
-
write
Write HEALPix MOC to a file- Parameters:
filename- name of file- Throws:
Exception
-
write
Write HEALPix MOC to a file- Parameters:
filename- name of filemode- encoded format (FITS or JSON)- Throws:
Exception
-
write
Write HEALPix MOC to an output stream- Parameters:
out- output stream- Throws:
Exception
-
write
Write HEALPix MOC to an output stream At the end, the stream is not closed- Parameters:
out- output streammode- encoded format (FITS or JSON or ASCII)- Throws:
Exception
-
writeASCII
Write HEALPix MOC to an output stream IN ASCII encoded format- Parameters:
out- output stream- Throws:
Exception
-
writeJSON
Write HEALPix MOC to an output stream IN JSON encoded format- Parameters:
out- output stream- Throws:
Exception
-
writeFits
Write HEALPix MOC to an output stream in FITS encoded format- Parameters:
out- output stream- Throws:
Exception
-
createUniq
- Throws:
Exception
-