/* @(#)CreateFits.java $Revision: 1.2 $ $Date: 2004-01-12 13:13:23 $ * * Copyright (C) 2002 European Southern Observatory * License: GNU General Public License version 2 or later */ package org.eso.fits; import java.util.*; import java.io.*; /** CreateFits class provides a static main method to test creation * and writing a FITS from scratch. * * @version $Revision: 1.2 $ $Date: 2004-01-12 13:13:23 $ * @author P.Grosbol, ESO, */ public class CreateFits{ public static final int ROWS = 473; /** Static method for testing the FITS class library. * * @param argv name of FITS file to create */ public static void main(String[] argv) { if (argv.length < 1) { System.err.println("Usage: java org.eso.fits.CreateFits file"); System.exit(1); } System.out.println("Start CreateFits"); // First create a data matrix int[] naxis = new int[2]; naxis[0] = 251; naxis[1] = 247; int nax = naxis[0] * naxis[1]; float[] data = new float[nax]; for (int n=0; n" + argv[0] + "<"); System.exit(-1); } catch (IOException e) { System.err.println("Error: cannot write file >" + argv[0] + "<"); System.exit(-1); } System.out.println("Finish CreateFits"); System.exit(0); } }