arf management

From: David P. Huenemoerder <dph_at_email.domain.hidden>
Date: Tue, 20 Oct 2009 21:27:42 -0400
Hi John,

I'm trying to manage arf loading in tgcat scripts to catch a problem I
have with some zero-valued arfs (e.g., an HETG extraction with a
zeroth order off the array has two spectra w/ zero counts and
zero-valued arfs).

If I load a zero-valued arf, load_arf returns a -1.  That is handy
because it tells me there is a problem, and I should not try to
continue and assign_arf (which generates an error).   However, if I
want to clean up, I have a zero-valued arf loaded, but I don't know
it's index.

How can I prevent this, other than loading an arf, checking for error,
then delete_arf( all_arfs[-1] ) to get the most-recently loaded arf
index?

My script does

    a = array_map( Integer_Type, &load_arf, anames ) ;

so I can't tell, (except by some messy interpolation) what values of
a[ where (a==-1)] would have been.

I'll probably convert to a loop instead of array map, since I can't
think of anything better.

Thanks,

-- Dave

David Huenemoerder  617-253-4283 (o); -253-8084 (f); http://space.mit.edu/home/dph
MIT Kavli Institute for Astrophysics and Space Research
70 Vassar St., NE80-6065,
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 Tue Oct 20 2009 - 21:27:49 EDT

This archive was generated by hypermail 2.3.0 : Fri May 02 2014 - 08:35:46 EDT