#!/bin/csh -f

### To measure Crab's flux from mosaic images named by their revolution number

if ( $#argv == 0) then
    echo Usage: $0 rev RA Dec
    echo ""
    exit
endif

mosaic_spec Crab$1_mosa2.fits.gz "res.fits(JMX2-PHA1-SPE.tpl)" EXTNAME=JMX2-MOSA-IMA Intensity=RECONSTRUCTED ra=$2 dec=$3 posmode=0 widthmode=-1 psf=2. | grep intensity=
/bin/rm -f res.fits
