ccdfits in=image out=fits [parameter=value]
An experimental version of this program that uses the standard cfitsio(3) library is known as ccdfitsio(1NEMO) .
A peculiar option is the use of the fitshead= keyword. In this mode the header of the output fits file will be replaced with that of the filename in the fitshead= keyword. This is dangerous, it is the responsility of the user to ensure the dimensions (NAXIS,1,2,3) and BITPIX of the two are the same, or else an illegal FITS file will be created. The program scanfits(1NEMO) is used behind the scenes to achieve this feat.
1.420405751786 GHz HI
115.271204 GHz CO(1-0)
230.538 GHz CO(2-1)
1900.5369 GHz [CII] 2P3/2-2P1/2
656.4614 nm H-alpha
a = "(a < 0 ? a+65536 : a)"or using ccdmath:
ccdmath in=map1 out=map2 fie="iflt(%1,0,%1+65536,%1)"
A reference map (refmap=) does not have to be a full FITS cube. If the NEMO
fitsio(3NEMO)
routines are used, the header will suffice, since the data
is never needed. You can see scanfits(1NEMO)
for this:
scanfits in=cube.fits out=cube.fitshdr select=header ccdfits ... refmap=cube.fitshdr ...
In the old days (somewhere before the 90s) there were actually software systems that could only directly read FITS files from tape, not from disk. The disk-fits file must be written to tape in ’raw’ format with a block length of 2880 bytes, which can be done with dd(1) :
% dd if=fits.dat of=/dev/rmt0 obs=2880
Under VMS the tape has to be mounted with the blocksize:
$ MOUNT MT:/FOREIGN/BLOCK=2880/RECORD=2880 $ COPY MT: FITS.DAT
and the file on disk must be recorded to have a 2880 blocksize:
$ FIXATR/RFM=FIX:2880 FITS.DAT
In case FTP is used to transfer files, remember that FTP cannot handle files with this format (some FTP’s at least). So it’s best to have them in regular 512 byte blocks before moving, and at 2880 blocksize when using programs such as DISKFITS in the VMS version of GIPSY.
You could also try
the following command procedure on VMS (Bob Hanisch, ST ScI):
$!----------------------------------------------------------------------
$! FIXFITS filename
$! FIXFITS CONVERTs a file to the desired AIPSFITS disk format
$!----------------------------------------------------------------------
$ create/fdl=sys$input: temp.dat
RECORD
CARRIAGE_CONTROL NONE
SIZE 2880
FORMAT FIXED
$! now convert - old fails some
$! convert/append ’P1’ TEMP.DAT
$! now convert - new method
$ copy ’P1’ TEMP.DAT/overlay
$ rename temp.dat ’P1’
$! clean up
$ purge ’P1’
$!
Teuben
~/src/pjt/image ccdfits.c ccdfits.1
29-apr-88 V1.0: created, calling WERONG fortran subroutines PJT 2-jun-88 V1.1: new filestruct, renamed wfits to ccdfits PJT 1-oct-90 V2.1: new fitsio and keyword comment=, scale now 1 PJT 11-oct-90 V2.2: added blocking= factor PJT nov-92 documented the FITFITS VMS procedure PJT dec-99 some more documentation PJT apr-01 V3.0 reference map/pixel to inherit a WCS from PJT 6-may-02 V4.0b properly implemented dummy= PJT 4-jan-04 V5.2 docomented the recent changes to crval/cdelt/crpix= PJT 20-jun-09 V5.4 added select= to grab not the first image PJT 26-may-2016 V5.8 added CUNITn and BUNIT and better parameters for radecvel=true PJT 27-dec-2020 V6.3 added fitshead= PJT 22-may-2021 V6.3d: object inherited from Image PJT 31-dec-2022 V6.6: add bunit= PJT