NRAO Home > CASA > CASA Toolkit Reference Manual
image.convertflux - Function

1.1.1 Convert peak intensity to/from flux density for a 2D Gaussian.

Description

This function interconverts between peak intensity and flux density for a Gaussian component. The image must hold a restoring beam.

Arguments

 Inputs value Flux density to convert. Must be specified. allowed: any Default: variant 0Jy/beam major Major axis of component. Must be specified. allowed: any Default: variant 1arcsec minor Minor axis of component. Must be specified. allowed: any Default: variant 1arcsec type Type of component. String from Gaussian, Disk. allowed: string Default: Gaussian topeak Convert to peak or integral flux desnity allowed: bool Default: true channel Channel to use if and only if image has per plane beams. allowed: int Default: -1 polarization Zero-based polarization number to use for beam if and only if image has per plane beams. allowed: int Default: -1
Returns
record

Example

"""
#
print "\t----\t convertflux Ex 1 \t----"
ia.maketestimage(’in.im’, overwrite=true);
p1 = qa.quantity(’1mJy/beam’)
i1 = ia.convertflux(p1, major=’30arcsec’, minor=’10arcsec’, topeak=F);
p2 = ia.convertflux(i1, major=’30arcsec’, minor=’10arcsec’, topeak=T)
print ’peak, integral, peak = ’, p1, i1, p2
#peak, integral, peak =  {’value’: 1.0, ’unit’: ’mJy/beam’}
#                        {’value’: 0.00016396129551656742, ’unit’: ’Jy’}
#                        {’value’: 0.0010000000000000002, ’unit’: ’Jy/beam’}

ia.close()
#
"""

__________________________________________________________________