Version 1.2.7  

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=value, rev_indx=&Array, err=Array] );
    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=noise, rev_indx=&rev]);
    Variables in [] are optional qualifiers.
    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
    Qualifiers:
    • 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
    • err : Array of errors for the PSD, in which case a PSD error array will be returned
    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)
    • apsd_err : Rebinned PSD error array

  3. sitar_rebin_rate( t, dt, rate [, err] [; tstart=#, tstop=#, minbin=#, user_bin=array, weight] )
    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, dt, rate, err; tstart=#, tstop=#, minbin=#,weight);
    Variables in [] are optional (or are optional qualifiers, after the semi-colon).
    Omitted variables take on default values.

    Inputs:
    • t : Discrete times at which rates are measured
    • dt : Width of evenly spaced time bins
    • rate : (Presumed GTI & Exposure Corrected) rates
    Optional Input:
    • err : Error on the rates
    Optional Qualifier Inputs:
    • tstart : Beginning of first time bin (Defaults to time of first event -1)
    • tstop : End of last time bin (Defaults to time of last event+1)
    • minbin : Minimum required events per bin, else the bin is set to 0, or ignored. Default=1.
    • user_bin_lo : Lower time bounds for a user defined binning grid
    • user_bin_hi : Upper time bounds for a user defined binning grid Overrides dt, tstart, and tstop inputs
    • delgap : If set, delete empty bins from the lightcurve, otherwise, set them to 0 (default)
    • weight : If set and err input, the mean is weighted by the 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 May 2, 2017 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.