public class NdfMaker extends Object
Constructor and Description |
---|
NdfMaker()
Constructs a default NdfMaker
|
Modifier and Type | Method and Description |
---|---|
HDSType |
getType()
Get the type with which the NDF DATA and VARIANCE arrays will be
created.
|
NDShape |
getWindow()
Get the shape of NDFs to be created, in the manner of an
NDF section.
|
void |
makeBlankNDF(Ndx ndx,
HDSObject ndfob)
Creates an NDF structure at a given location based on an NDX,
but doesn't fill in the array components.
|
void |
makeNDF(Ndx ndx,
HDSObject ndfob)
Populates an NDF structure at a given location with data from an NDX.
|
HDSReference |
makeNDF(Ndx ndx,
String container)
Creates an NDF in a named container file from an NDX.
|
HDSReference |
makeTempNDF(Ndx ndx)
Creates an NDF in temporary filespace from an NDX.
|
void |
setType(HDSType hdstype)
Set the type for the DATA and, if available, VARIANCE components
of created NDFs.
|
void |
setWindow(NDShape window)
Set the shape of NDFs to be created, in the manner of an
NDF section.
|
public void setType(HDSType hdstype)
Note: not all HDS types may be used: only the following are valid: _BYTE, _WORD, _INTEGER, _REAL, _DOUBLE
hdstype
- the required data type for DATA and VARIANCE components.
If null, a type corresponding to that of the NDX
arrays is used.public HDSType getType()
public void setWindow(NDShape window)
window
- the shape of NDFs to be written. If null, the
shape of the NDX's image array will be usedpublic NDShape getWindow()
public HDSReference makeTempNDF(Ndx ndx) throws IOException
The container file is written in one of the following directories (listed in order of preference):
uk.ac.starlink.hds.scratch
system property
java.io.tmpdir
system property
ndx
- the NDX to copyIOException
- if there was some error in parsing the NDX
or creating the NDFpublic HDSReference makeNDF(Ndx ndx, String container) throws IOException
ndx
- the NDX to copycontainer
- the pathname of a container file to which the
NDF should be written. Do not include the '.sdf'.
A new file container.sdf will be written and the
NDF will put into the top-level structure.IOException
- if there was some error in parsing the NDX
or creating the NDFpublic void makeNDF(Ndx ndx, HDSObject ndfob) throws IOException
ndx
- the NDX to copyndfob
- an HDS structure into which the NDF's components
are to be writtenIOException
- if there was some error in parsing the NDX
or creating the NDFpublic void makeBlankNDF(Ndx ndx, HDSObject ndfob) throws IOException
ndx
- the NDX to copyndfob
- an HDS structure into which the NDF's components
are to be writtenIOException
- if there was some error in parsing the NDX
or creating the NDFCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.