Version 0.8.0  

Rebinning Data

 

Rebinning Functions

  1. sitar_lbin_cpd( f, psda, psdb, cpd, dff, [noisea, noiseb, &rev] );
    Logarithmically rebin two Power Spectral Densities (and, optionally, their associated Poisson, noise levels) and the associated Cross Power Spectral Density
    Run as: isis> (af_lo,af_hi,apsda,apsdb,acpd,nf,[anoisea,anoiseb]) = sitar_lbin_cpd(f,psda,psdb,cpd,dff,[noisea,noiseb,&rev]);
    Variables in [] are optional, but are order specific.
    Variables omitted take on default values.

    Inputs:
    • f : Array of Fourier frequencies
    • psda/b : Arrays of PSD values
    • cpd : Array of Cross Power Spectral Density
    • dff : Delta f/f value for logarithmic bin spacing
    Optional Inputs:
    • noisea/b : Array (*or single value*) of Poisson noise levels
    • rev : If declared (i.e., `isis> variable rev;') and input, returns the reverse indices for the binning
    Outputs:
    • af_lo/af_hi : Lower/Upper bounds of Fourier frequency bins
    • apsda/b : Rebinned Power Spectral Density values
    • acpd : Rebinned Cross Power Spectral Density
    • nf : Number of frequencies going into the bin
    Optional Outputs:
    • anoisea/b : Rebinned noise level (array, even for single value input)

  2. sitar_lbin_psd( f, psd, dff, [noise, &rev] );
    Logarithmically rebin a Power Spectral Density (and, optionally, its associated Poisson noise)
    Run as: isis> (af_lo,af_hi,apsd,nf,[anoise]) = sitar_lbin_psd(f,psd,dff,[noise, &rev]);
    Variables in [] are optional, but are order specific.
    Variables omitted take on default values.

    Inputs:
    • f : Array of Fourier frequencies
    • psd : Array of PSD values
    • dff : Delta f/f value for logarithmic bin spacing
    Optional Inputs:
    • noise : Array (*or single value*) of Poisson noise levels
    • rev : If declared (i.e., `isis> variable rev;') and input, returns the reverse indices for the binning
    Outputs:
    • af_lo/af_hi : Lower/Upper Bounds of Fourier frequency bins
    • apsd : Rebinned Power Spectral Density values
    • nf : Number of frequencies going into the bin
    Optional Outputs:
    • anoise : Rebinned noise level (array, even for single value input)

  3. sitar_rebin_rate( t, rate [, err, dt, tstart, tstop, minbin, gap, cust, wght] )
    Rebin a rate lightcurve (i.e., good time intervals, effective areas, etc., assumed applied) to a new time grid.
    Run as: isis> lc = sitar_rebin_rate(t,rate,err,dt,tstart,tstop,minbin,gap,cust,wght);
    Variables omitted or set to Integer_Type 0 take on default values.
    Variables in [] are optional, but are order specific.

    Inputs:
    • t : Discrete times at which rates are measured
    • rate : (Presumed GTI & Exposure Corrected) rates
    Optional Inputs:
    • err : Error on the rates
    • dt : Width of evenly spaced time bins (Defaults to 1/100 of length of lightcurve)
    • tstart : Beginning of first time bin (Defaults to time of first event)
    • tstop : End of last time bin (Defaults to time of last event)
    • minbin : Minimum required events per bin, else the bin is set to 0, or ignored. Default=1.
    • gap : = 0 - Empty bins are set to 0 (default)
      != 0 - Empty bins are deleted from the lightcurve
    • cust.bin_lo : Lower time bounds for a user defined binning grid
    • cust.bin_hi : Upper time bounds for a user defined binning grid Overrides dt, tstart, and tstop inputs
    • wght : Default = 0. If != 0, and err !=0, mean is weighted by the input error. I.e., mean = (\sum rate/err^2)/(\sum 1/err^2), and the output variance becomes \sum (mean-rate/err^2)^2/(\sum 1/err^2)^2
    Outputs:
    • lc.rate : Mean rate of resulting rebinning
    • lc.bin_lo : Lower time bounds of rebinned lightcurve
    • lc.bin_hi : Upper time bounds of rebinned lightcurve
    • lc.num : Number of events going into a bin
    • lc.var : Variance of the rate in a time bin. ** Only calculated where lc.num >= 2 **, otherwise set to zero.
    Optional Outputs:
    • lc.err : Rate errors combined in quadrature, i.e., it's sqrt{\sum{err^2}}/N, where N is the number of points in a given bin. Only calculate if err is input [otherwise, just use sqrt(lc.var)].


This page was last updated Oct 15, 2007 by Michael Nowak. To comment on it or the material presented here, send email to mnowak@space.mit.edu.
Valid HTML 4.01! Made with JED. Viewable With Any Browser.