Re: binned data

From: David P. Huenemoerder <dph>
Date: Mon, 12 May 2003 22:26:11 -0400
Hi Marc - 

    Marc> Why does ISIS consider binned spectra created by
    Marc> add_grating_order as 8192 bins spectra, while they should be
    Marc> 8192/N bins spectra, where N is the rebinning factor?

If you mean the add_grating_orders contributed script, it doesn't
really bin, but groups.  This mean it adds the optional GROUPING
column and sets flags in it to associate bins.

I don't think isis reads the grouping column (John H. - correct me if
I'm wrong).  

Instead, the preferred method is to group dynamically.

rebin_data can be used in a fashion equivalent to the FITS GROUPING
spec.  Alternatively, you can use group_data for integer factors.

The dynamic aspect is very useful for grating spectroscopy, because
of the large dynamic range and because of the need to interactively
iterate.  You do not have to create a new file everytime you want to
change the grouping.  You can group HEG and MEG separately, change
your mind about the grouping and redo the fit, etc.

However, if you have painstakingly created a grouping column in a pha
file, you can read it and apply it:

  define rd_grouping( f_pha )
  {
    return grp = fits_read_col( f_pha, "GROUPING");
  }

  rebin_data( n, rd_grouping( f_pha ) );


I didn't try this; I know it isn't quite right for a PHA Type II
file, because the returned value from rd_grouping would be 2
dimensional.  But the point is that it is a fairly simple function.

Hope this helps.

-- Dave

David Huenemoerder (617-253-4283; fax: 253-8084)
MIT Center for Space Research/Chandra X-ray Center
70 Vassar St., NE80-6023,
Cambridge, MA  02139
[Admin. Asst.: Elaine Tirrell, 617-253-7480, egt_at_email.domain.hidden----
You received this message because you are
subscribed to the isis-users list.
To unsubscribe, send a message to
isis-users-request_at_email.domain.hiddenwith the first line of the message as:
unsubscribe
Received on Mon May 12 2003 - 22:27:45 EDT

This archive was generated by hypermail 2.2.0 : Thu Mar 15 2007 - 08:45:50 EDT