convert Nobeyama Image FITS to CASA

  • download python script (click with right mouse button and save): fixnrofits.tar.gz
  • then, unzip it by a command like tar -zxvf fixnrofits.tar.gz


  • usage: python3 fixnrofits.py [-h] [-f RESTFREQ] [-v VRAD] fitsname [outfitsname]

    Fix FITS header to import NRO Image FITS into CASA.

    positional arguments:

    fitsname Input Image FITS name

    outfitsname Output Image FITS name (optional). If not specified, overwrite input Image FITS.

    optional arguments:

    -h, --help show this help message and exit

    -f RESTFREQ, --restfreq RESTFREQ

    Rest frequency in GHz

    -v VRAD, --velocity-type VRAD

    if velocity is in the radio definition (default)

    -v VOPT, --velocity-type VOPT

    if velocity is in the optical definition



    We have noticed that some of Nobeyama Image FITSs cannot be converted to feed into CASA with this script successfully, probably due to incomplete FITS header information. Note that we release this script with such limitation.
    If you encounter a problem with the following error "SEVERE??????importfits::::casa??????Exception Reported: Error in importfits: wcs wcsset_error: Ill-conditioned coordinate transformation parameter" in importfits in CASA, please download the current version of this software or please try "sed -i -e 's/GLS/SFL/g' fitsname.fits" on your UNIX/LINUX environment and do importfits.
    2024-06-04 nro45mrt @ NRO