From wmclaugh@head-cfa.harvard.edu Mon Nov 17 13:24:22 1997
Received: from space.mit.edu by juggler AA04416; Mon, 17 Nov 97 13:24:21 EST
Received: from head-cfa (head-cfa.harvard.edu) by space.mit.edu AA23869; Mon, 17 Nov 97 13:24:20 EST
Received: from cfatrw1 by head-cfa (SMI-8.6/SMI-SVR4)
	id NAA20144; Mon, 17 Nov 1997 13:24:19 -0500
Message-Id: <199711171824.NAA20144@head-cfa>
To: Joel Kastner <jhk>
Subject: Re: grade scheme params 
Cc: wmclaugh@head-cfa.harvard.edu
In-Reply-To: Message from Joel Kastner <jhk@space.mit.edu> 
 of "Mon, 17 Nov 1997 12:43:12 -0500." <199711171743.MAA18299@head-cfa> 
Date: Mon, 17 Nov 1997 13:24:18 -0500
From: Warren McLaughlin <wmclaugh@head-cfa.harvard.edu>
Status: OR

> Thanks for keeping me up-to-date on your tests of Dewey's L0 output data.
> 
> I have a question about the conversion from flight_grade to ASCA_grade and
> (eventually) ACIS_grade: how are you actually implementing the mapping from
> flight grade to ASCA grade? Can you point me to a specific example (whether
> it be a param file, *.h file, or whatever)? [I'm trying to 'capture' the
> mapping in the form of 'standard' reference data and/or param files.]


The current code to convert fltgrades to ASCA/ACIS grades can be found in: 

  /data/tools/staff/wlm/acis_process_events/acis_process_events_functions.c

The relevant functions ares:  find_asca_grade and find_acis_grade 
and they work as follows:

    input:   the flight grade  (0-255)
             the size of the event (ie 3 for CC, 25 for VF, and 9 for TE)
                 -currently the size is only interpreted as 3 (CC mode) and
                  other (not CC mode- ie. graded TE mode uses a 9).
    output:  the corresponding ACIS/ASCA grade
    
    processing: the routines take in a fltgrade and island size and determine
             which mapping to use (ie. a CC asca grade PL looks has a different
             fltgrade than a TE mode asca grade PL). The mapping of flight grades 
             to the appropriate ASCA or ACIS grades is then performed via a 
             switch statement.


When executing acis_process_events (evtacisdet for xrcf), the parameters 

     doevtgrade (yes/no) determines whether the tool calculates a fltgrade. This
                 should be set to no for graded, and yes otherwise

     scheme (ACSA/ACIS/NONE) - this determines what kind of grading - asca, acis,
                  or none   to apply based on the fltgrade (either calculated by
                  the tool when the doevtgrade is set to yes or based on the value
                  in the input file- ie graded mode).
`

If this isn't the type of info you are looking for, or have other questions let me
know...

-Warren

ps. Regarding your messages from 11/05-11/06 on acis_build_mask and
    acis_build_badpix specs, I haven't had a chance to look at them yet. I'll try to
    get to them sometime this week. Sorry its taking so long... 

