gals/
ajs_lf_plot.pro
This procedure produces a plot of the luminosity function.
Routines
- result = ajs_lf_plot_xrange(bincentres=bincentres, loglum=loglum, schechter=schechter, double_schechter=double_schechter)
- Choose and set xrange 
- result = ajs_lf_plot_yrange(phi=phi, input_logphi=input_logphi, plot_logphi=plot_logphi, schechter=schechter, double_schechter=double_schechter)
- Choose and set yrange 
- ajs_lf_plot_legend, legend_text=legend_text, legend_pos=legend_pos, arg_legend_pos=arg_legend_pos, schechter=schechter, double_schechter=double_schechter, color=color, psym=psym, _REF_EXTRA=_REF_EXTRA
- Add legend text to the plot 
- ajs_lf_plot [, bincentres=bincentres] [, phi=phi] [, err_phi=err_phi] [, neg_err_phi=neg_err_phi] [, pos_err_phi=pos_err_phi] [, lower_limit_where=lower_limit_where] [, schechter=schechter] [, sch_range=sch_range] [, double_schechter=double_schechter] [, double_cov_mat=double_cov_mat] [, abs_mag=abs_mag] [, weights=weights] [, jackknife=jackknife] [, nbins=nbins] [, datfile=datfile] [, overplot=overplot] [, plotfile=plotfile] [, show_plot=show_plot] [, open=open] [, close=close] [, xrange=xrange] [, yrange=yrange] [, input_logphi=input_logphi] [, plot_logphi=plot_logphi] [, loglum=loglum] [, ylog=ylog] [, psym=psym] [, symcat_thick=symcat_thick] [, band_name=band_name] [, color=color] [, xstyle=xstyle] [, ystyle=ystyle] [, title=title] [, xtitle=xtitle] [, ytitle=ytitle] [, legend_pos=fltarr(2)] [, legend_text=legend_text] [, cov_mat=cov_mat] [, _REF_EXTRA=_REF_EXTRA]
- This procedure produces a plot of the luminosity function. 
Routine details
topajs_lf_plot_xrange
result = ajs_lf_plot_xrange(bincentres=bincentres, loglum=loglum, schechter=schechter, double_schechter=double_schechter)
Choose and set xrange
Keywords
- bincentres
- loglum
- schechter
- double_schechter
topajs_lf_plot_yrange
result = ajs_lf_plot_yrange(phi=phi, input_logphi=input_logphi, plot_logphi=plot_logphi, schechter=schechter, double_schechter=double_schechter)
Choose and set yrange
Keywords
- phi
- input_logphi
- plot_logphi
- schechter
- double_schechter
topajs_lf_plot_legend
ajs_lf_plot_legend, legend_text=legend_text, legend_pos=legend_pos, arg_legend_pos=arg_legend_pos, schechter=schechter, double_schechter=double_schechter, color=color, psym=psym, _REF_EXTRA=_REF_EXTRA
Add legend text to the plot
Keywords
- legend_text
- legend_pos
- arg_legend_pos
- schechter
- double_schechter
- color
- psym
- _REF_EXTRA
topajs_lf_plot
ajs_lf_plot [, bincentres=bincentres] [, phi=phi] [, err_phi=err_phi] [, neg_err_phi=neg_err_phi] [, pos_err_phi=pos_err_phi] [, lower_limit_where=lower_limit_where] [, schechter=schechter] [, sch_range=sch_range] [, double_schechter=double_schechter] [, double_cov_mat=double_cov_mat] [, abs_mag=abs_mag] [, weights=weights] [, jackknife=jackknife] [, nbins=nbins] [, datfile=datfile] [, overplot=overplot] [, plotfile=plotfile] [, show_plot=show_plot] [, open=open] [, close=close] [, xrange=xrange] [, yrange=yrange] [, input_logphi=input_logphi] [, plot_logphi=plot_logphi] [, loglum=loglum] [, ylog=ylog] [, psym=psym] [, symcat_thick=symcat_thick] [, band_name=band_name] [, color=color] [, xstyle=xstyle] [, ystyle=ystyle] [, title=title] [, xtitle=xtitle] [, ytitle=ytitle] [, legend_pos=fltarr(2)] [, legend_text=legend_text] [, cov_mat=cov_mat] [, _REF_EXTRA=_REF_EXTRA]
This procedure produces a plot of the luminosity function.
Data may be entered in four forms:
(1) Values at particular absolute magnitudes (bincentres, phi[, err_phi])
(2) (double) Schechter function parameters (always plotted if supplied)
(3) Array of galaxy absolute magnitudes and weights (e.g., 1/Vmax) - ignored if (1) set
(4) From a file, to be read using ajs_lf_read - ignored if (1) or (3) set
In addition, a (double) Schechter function fit can be performed.
Keywords
- bincentres in optional
- phi in optional
- err_phi in optional
- neg_err_phi in optional
- Negative error, for asymmetric 
- pos_err_phi in optional
- Positive error, for asymmetric 
- lower_limit_where in optional
- Indices of values of phi where the upper error bar is a lower limit (i.e., plot arrowhead and empty circle, if psym=16 set) 
- schechter in optional
- Plot Schechter function. Set to undefined variable to calculate best-fitting Schechter function and return the parameters. Or set /schechter to calculate and print the parameters 
- sch_range in optional
- Range of absolute magnitudes for (double) Schechter fit (ajs_schechter_fit) 
- double_schechter in out optional
- Plot double Schechter function. Set to undefined variable to calculate best-fitting double Schechter function and return the parameters. Or set /double_schechter to calculate and print the parameters 
- double_cov_mat out optional
- Covariance matrix of double Schechter function fit 
- abs_mag in optional
- Array of absolute magnitudes (use with weights) 
- weights in optional
- Array of weights (e.g., 1/Vmax) for estimating luminosity function 
- jackknife in optional
- Used with absmag, this is an integer for each galaxy giving the jackknife region in which the galaxy lies 
- nbins in optional
- Number of bins for abs_mag & weights (use with xrange or bincentres) 
- datfile in optional
- Input data: binary format file created by ajs_lf_write 
- overplot in optional
- Set /overplot to overplot 
- plotfile in optional
- EPS file name 
- show_plot in optional
- Set /show_plot to open the EPS file for viewing 
- open in optional
- Set /open to open the EPS file and leave it for overplotting 
- close in optional
- Set /close to close the EPS plotfile 
- xrange in out optional
- yrange in out optional
- input_logphi in optional
- Set /input_logphi to indicate data values are log(phi) rather than phi 
- plot_logphi in optional
- Set /plot_logphi to plot log(phi) rather than phi (redundant if overplotting) 
- loglum in optional
- Set /loglum for log luminosities rather than magnitudes 
- ylog in optional default=1-plot_logphi
- psym in optional
- Uses D. Fanning's symcat (e.g., 16 = filled circle) for non-standard psym values 
- symcat_thick in optional
- Thick keyword for symcat 
- band_name in optional
- For the x-axis: M_ - - 5 log h 
- color in optional
- xstyle in optional
- Default /xstyle 
- ystyle in optional
- Default /ystyle 
- title in optional
- Title for plot 
- xtitle in optional
- Title for x-axis 
- ytitle in optional
- Title for y-axis 
- legend_pos in out optional type=fltarr(2)
- [xpos, ypos] for legend text. Output is position for next legend label, for overplotting. varies from [0, 0] = [left, bottom] to [1, 1] = [right, top]. 
- legend_text in optional
- Legend text 
- cov_mat out optional
- Covariance matrix of Schechter function fit 
- _REF_EXTRA in optional
- Extra keywords for plots 
Examples
bincentres = [-20, -22, -24]
phi = [1e-2, 1e-2, 1e-3]
err_phi = [1e-2, 1e-3, 1e-4]
ajs_lf_plot, bincentres=bincentres, phi=phi
ajs_lf_plot, bincentres=bincentres, phi=phi, err_phi=err_phi
ajs_lf_plot, bincentres=bincentres, phi=phi, err_phi=err_phi, psym=16
ajs_lf_plot, schechter=[-24,-1,1e-2]
ajs_lf_plot, schechter=[-24,-1,1e-2], color=2, bincentres=bincentres, phi=phi, err_phi=err_phi, xrange=[-16,-26], psym=16, plotfile='~/lf.eps', /show_plot
Author information
| History: | 13 Feb 2008 Created, Anthony Smith 5 Mar 2008 err_phi no longer required 6 Mar 2008 Added abs_mag, weights and nbins 18 Mar 2008 Added jackknife 25 Mar 2008 Added legend_text and legend_pos 4 Apr 2008 Added sch_range (ajs_schechter_fit range) 7 Apr 2008 Schechter function info included in call to ajs_vmax_lf 21 Apr 2008 double Schechter function input 23 Apr 2008 psym now uses D. Fanning's symcat routine; added lower_limit_where keyword 1 May 2008 Uses ajs_plot_pos for legend position | 
File attributes
| Modifcation date: | Wed Oct 29 11:00:51 2008 | 
| Lines: | 715 | 
| Docformat: | rst rst | 
![[attach.png]](../idldoc-resources/attach.png)