Examples of addHDU()


Examples of net.ivoa.fits.Fits.addHDU()

  
   * </pre>
   */
  public void testTable1() throws Exception {
    Fits f = new Fits();
    f.addHDU(Fits.makeHDU(new Object[]{bytes, bits, bools, shorts, ints,
        floats, doubles, longs, strings}));

    BinaryTableHDU bhdu = (BinaryTableHDU) f.getHDU(1);
    bhdu.setColumnName(0, "bytes", null);
    bhdu.setColumnName(1, "bits", "bits later on");
View Full Code Here

Examples of net.ivoa.fits.Fits.addHDU()

  public void testTable2() throws Exception {
    BasicHDU hdu = Fits.makeHDU(new Object[]{floats, vf, vs, vd, shorts,
        vbool});
    Fits f = new Fits();
    f.addHDU(hdu);

    BufferedDataOutputStream bdos = new BufferedDataOutputStream(
        new FileOutputStream("bt2.fits"));
    f.write(bdos);
View Full Code Here

Examples of net.ivoa.fits.Fits.addHDU()

    btab.addColumn(strings);
    btab.addColumn(vbool);
    btab.addColumn(ints);

    Fits f = new Fits();
    f.addHDU(Fits.makeHDU(btab));

    BufferedDataOutputStream bdos = new BufferedDataOutputStream(
        new FileOutputStream("bt3.fits"));
    f.write(bdos);
View Full Code Here

Examples of net.ivoa.fits.Fits.addHDU()

      row[2] = "new string:" + i;
      btab.addRow(row);
    }

    f = new Fits();
    f.addHDU(Fits.makeHDU(btab));
    BufferedFile bf = new BufferedFile("bt4.fits", "rw");
    f.write(bf);
    bf.flush();
    bf.close();
View Full Code Here

Examples of net.ivoa.fits.Fits.addHDU()

    f = new Fits();
    FitsFactory.setUseAsciiTables(false);
    BasicHDU hdu = Fits.makeHDU(x);
    hdu.toString();
    f.addHDU(hdu);
    bf = new BufferedFile("bt5.fits", "rw");
    f.write(bf);
    bf.close();

    /*File fi = new File("bt1.fits");
View Full Code Here

Examples of nom.tam.fits.Fits.addHDU()

        hdu.getHeader().addValue("EXTNAME", extName, "Contains saved JSkyCat graphics");
        hdu.setColumnName(0, "type", null);
        hdu.setColumnName(1, "coords", null);
        hdu.setColumnName(2, "config", null);
        deleteHDU(extName);
        fits.addHDU(hdu);
        imageDisplay.checkExtensions(true);
    }

    /**
     * Deletes the existing FITS binary table with the given name.
View Full Code Here

Examples of nom.tam.fits.Fits.addHDU()

            // Check for a stored StarTable, which has a corresponding VOTMETA HDU with more info
            String votMetaName = VOTMETA + name.replace(TABLE_SUFFIX, "");
            BasicHDU votMetaHdu = findHDU(fits, votMetaName);
            if (votMetaHdu != null) {
                Fits tmpFits = new Fits();
                tmpFits.addHDU(votMetaHdu);
                tmpFits.addHDU(hdu);
                votMetaHdu.getHeader().removeCard("EXTNAME"); // not expected by FitsPlusTableBuilder
                votMetaHdu.getHeader().removeCard("EXTEND"); // not expected by FitsPlusTableBuilder
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                BufferedDataOutputStream bos = new BufferedDataOutputStream(os);
View Full Code Here

Examples of nom.tam.fits.Fits.addHDU()

            String votMetaName = VOTMETA + name.replace(TABLE_SUFFIX, "");
            BasicHDU votMetaHdu = findHDU(fits, votMetaName);
            if (votMetaHdu != null) {
                Fits tmpFits = new Fits();
                tmpFits.addHDU(votMetaHdu);
                tmpFits.addHDU(hdu);
                votMetaHdu.getHeader().removeCard("EXTNAME"); // not expected by FitsPlusTableBuilder
                votMetaHdu.getHeader().removeCard("EXTEND"); // not expected by FitsPlusTableBuilder
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                BufferedDataOutputStream bos = new BufferedDataOutputStream(os);
                tmpFits.write(bos);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.