imstat_cas6745

Return to directory of Todd's CASA extensions

Runs CASA task imstat using a work-around for CAS-6745, which is a bug that crashes imstat if the BUNIT is not recognized. If it detects that BUNIT is equal to the specified value, it copies the image to *.temp, sets the BUNIT to 'K', runs imstat, then deletes the copy.

Usage:

au.imstat_cas6745(img, bunit='"1e15 cm^-2"')

Example:

CASA <3>: au.imstat_cas6745('g12.68/nnh3.g12.68_1_out.image')
2014-07-02 09:36:03     WARN            FITS unit ""1e15 cm^-2"" unknown to CASA - will treat it as non-dimensional.
2014-07-02 09:36:03     WARN            FITS unit ""1e15 cm^-2"" unknown to CASA - will treat it as non-dimensional.
  Out[3]:
{'blc': array([0, 0], dtype=int32),
 'blcf': '18:13:57.645, -18.02.28.999',
 'max': array([ 59.22025681]),
 'maxpos': array([412, 425], dtype=int32),
 'maxposf': '18:13:54.756, -18.01.46.500',
 'mean': array([ 15.13657299]),
 'medabsdevmed': array([ 7.3842864]),
 'median': array([ 8.11978531]),
 'min': array([ 0.]),
 'minpos': array([448, 454], dtype=int32),
 'minposf': '18:13:54.504, -18.01.43.600',
 'npts': array([ 820.]),
 'quartile': array([ 24.68362236]),
 'rms': array([ 22.51512337]),
 'sigma': array([ 16.67795476]),
 'sum': array([ 12411.98984801]),
 'sumsq': array([ 415683.26065449]),
 'trc': array([839, 839], dtype=int32),
 'trcf': '18:13:51.763, -18.01.05.099'}

CASA <4>: 

-- ToddHunter - 2014-07-02

This topic: ALMA > TWikiUsers > ToddHunter > CasaExtensions > Imstat_cas6745
Topic revision: 2014-07-02, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback