Usage of planetFlux

Return to directory of Todd's CASA extensions

A wrapper for testing Bryan Butler's solar_system_fd() function. Makes a plot of flux density vs. time (i.e. a lightcurve), or vs. frequency (i.e. a spectrum) if a range of dates or frequencies is requested. Spectra from up to 6 different dates can be overlaid.


au.planetFlux(body='', date=None, mjd=None, frequency=345e9, bandwidth=1e6,
               dayIncrement=1.0, plotfile=None, verbose=False, observatory='ALMA',
               timeUnits='MJD', rotation=60, fontsize=8, hspace=0.4, bottom=0.2,
               vis=None, spw=None, separation=False, secondFrequency=None,
               showRADec=False, decrange=0, rarange=0)
  • body: To see the list of supported planets, type help(au.sss.solar_system_fd)
  • date: a string of format: 2011/10/15, 2011/10/15 05:00:00, or 2011/10/15-05:00:00, or 2011-10-15-05:00:00"
  • mjd: a single value or a list of 1 or 2 MJDs (2 = a range)
  • frequency: a single value or a list of 1 or 2 frequencies in Hz (a list of 2 is interpreted as a range)
  • bandwidth: define the bandwidth at a single frequency or the increment for the range (in Hz)
  • dayIncrement: define the MJD increment for the plot
  • plotfile: specify the output png name, None=use default name
  • observatory: only has effect in casa 4.0 or later, default = 'ALMA'
  • timeUnits: when x-axis is time, set the units: 'MJD' (default) or 'YMD' where the labels will be, e.g. "Jan 2012"
  • rotation: the angle of the x-axis tick labels (for timeUnits='YMD')
  • fontsize: the font size of the x-axis tick labels (for timeUnits='YMD')
  • hspace: the hspace value for pylab.subplots_adjust (for timeUnits='YMD')
  • wspace: the wspace value for pylab.subplots_adjust (for timeUnits='YMD')
  • vis: the name of an ms from which to grab the start time and body name
  • spw: the spw for which to use the mean frequency instead of the frequency parameter
  • separation: if True, then if the object is a Jovian moon or Titan, it will compute separations between it and the planet and other moons
  • secondFrequency: if specified, then a plot of flux vs. time will be a flux1/flux2 ratio
  • showRADec: if True , then make a second plot of the RA and Dec vs. time
  • decrange: half of the y-axis range to use when plotting Dec
  • rarange: half of the y-axis range to use when plotting RA

Return value:
  • if a plot is computed: nothing
  • if single value computed: a dictionary containing the following keys and units:
    • {'fluxDensity': Jy, 'direction': casa direction structure, 'majorAxis': arcsec, 'minorAxis': arcsec, 'positionAngle': deg}


CASA <6>: au.planetFlux('Neptune',mjd=55600, frequency=345e9, bandwidth=1e9)
Flux density at 345.000 GHz averaged over a 1.000 GHz bandwidth is 19.235201 Jy.
J2000 Position = 22:00:53.06640, -012:40:01.740000
{'direction': {'m0': {'unit': 'rad', 'value': -0.519739678089214},
               'm1': {'unit': 'rad', 'value': -0.22108347434399972},
               'refer': 'J2000',
               'type': 'direction'},
 'fluxDensity': 19.235200787467598,
 'majorAxis': 2.2038607148827163,
 'minorAxis': 2.16750962751849,
 'positionAngle': 334.9312000000002}

CASA <3>: au.planetFlux('Neptune',date='2011/02/08', frequency=[275e9,373e9], bandwidth=1e9)
MJD= 55600.00000, MJDseconds = , JD= 2455600.50000
Plot left in  Neptune.fluxvsfreq.275-372GHz.png
CASA <4>: au.planetFlux('Neptune',date=['2011/01/01','2012/01/01'], frequency=275e9, bandwidth=1e9)
Plot left in  Neptune.fluxvstime.55562-55926.png
CASA <5>: au.planetFlux('Titan', date=['2012-12-01','2013-01-02'], frequency=[340e9,350e9], bandwidth=1e8)
Titan.fluxvsfreq.340-349GHz.png-- Main.ToddHunter - 2012-08-27
Topic revision: r12 - 2014-12-21, 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