On May 16, 2011, at 1:36 PM, Rob Gibson wrote: > Thanks, Michael and Victoria. I see how this works... didn't realize you could pass Isis_Active_Dataset like that. You can get pretty sophisticated with the way you use Isis_Active_Dataset, e.g.: define cst() { if( 5 <= Isis_Active_Dataset <=8 ) { return constant(1); } else if( 9 <= Isis_Active_Dataset <=12 ) { return constant(2); } else if( 13 <= Isis_Active_Dataset <=16 ) { return constant(3); } else { return constant(3); } } This is for a gratings observation where I break up the data into 3 flux levels, and want to have the model return different pieces for each of the three sets of four detectors (MEG +/-1, HEG+/-1: the first four datasets, which I exclude from the fits, are the average spectra, so the model starts at dataset 5). I create similar functions for all of the model components (absorption, powerlaw, and a cross normalization constant), and end up with a model that gets input as: cisgri*cflux(Isis_Active_Dataset,TBnew(20)*(TB*(pl)+cst*pl)) which is really just a partially covered powerlaw, with an overall external normalization, and a normalization constant for the 17th dataset (ISGRI on INTEGRAL). (cflux is an XSPEC convolution model to replace a model normalization with the detected flux instead. It's actually been in XSPEC several years now, which we didn't realize until after our friends in Bamberg independently reinvented it as an ISIS S-lang defined convolution model.) John has also built in infrastructure (whose syntax I'm forgetting at the moment) to assign model expressions just to specific datasets that can achieve the same thing. But it's nice to have the Isis_Active_Dataset with which to program. -Mike ---- 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: unsubscribeReceived on Mon May 16 2011 - 14:20:40 EDT
This archive was generated by hypermail 2.3.0 : Fri May 02 2014 - 08:35:47 EDT