Package nom.tam.fits

Examples of nom.tam.fits.BasicHDU


     */
    public static void deleteTable(Fits fits, String name) throws FitsException, IOException {
        int numHDUs = fits.getNumberOfHDUs();
        String votMetaName = VOTMETA + name.replace(TABLE_SUFFIX, "");
        for (int hduIndex = numHDUs - 1; hduIndex >= 0; hduIndex--) {
            BasicHDU basicHDU = fits.getHDU(hduIndex);
            Header header = basicHDU.getHeader();
            String extName = header.getStringValue("EXTNAME");
            if (extName != null && (extName.equals(name) || extName.equals(votMetaName))) {
                // delete the old table or metadata table
                fits.deleteHDU(hduIndex);
            }
View Full Code Here


        _fitsImage = fitsImage;
        int numRows = _fitsImage.getNumHDUs();
        _tableData = new Object[numRows][NUM_COLS];
        int count = 0;
        for (int row = 0; row < numRows; row++) {
            BasicHDU hdu = _fitsImage.getHDU(row);
            if (_isHidden(hdu)) {
                continue;
            }
            Header header = hdu.getHeader();
            _tableData[count][HDU_INDEX] = row;
            _tableData[count][TYPE_INDEX] = _getHDUType(hdu);
            _tableData[count][EXTNAME_INDEX] = header.getStringValue("EXTNAME");
            _tableData[count][NAXIS_INDEX] = header.getIntValue("NAXIS");
            _tableData[count][NAXIS1_INDEX] = header.getIntValue("NAXIS1");
View Full Code Here

    /**
     * Return the given HDU or null if it can not be accessed.
     */
    public BasicHDU getHDU(int num) {
        BasicHDU hdu = null;
        // XXX how to handle errors...
        try {
            hdu = _fits.getHDU(num);
        } catch (Exception ignored) {
        }
View Full Code Here

        if (_hduIndex == num) {
            return;
        }

        _hduIndex = num;
        BasicHDU hdu = _fits.getHDU(num);
        if (hdu instanceof ImageHDU) {
            _hdu = (ImageHDU) _fits.getHDU(num);
            _tiler = _hdu.getTiler();
            _axes = _hdu.getAxes();
            _header = _hdu.getHeader();
View Full Code Here

TOP

Related Classes of nom.tam.fits.BasicHDU

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.