It works!! thank you Dave! On Mon, May 20, 2013 11:15 am, David P. Huenemoerder wrote: > > I will let John (or anyone else) address the error, but for the time > being, below is another way to achieve what I think you want: (I've not > used the aped_hook_args; it seems to be returning nothing, because I > think maybe there are no args required.) > > Also note you need to use wavelength grids, and you could also restrict > the line-lists to relevant wavelength ranges if you wish. > > > -- Dave > > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > variable aped_flag = struct { contrib_flag, line_list }; > > % Default contributions: > % > aped_flag.line_list = NULL; > aped_flag.contrib_flag = MODEL_LINES_AND_CONTINUUM ; > > define aped_hook ( id ) > { > return ( aped_flag ) ; > } > > variable t = default_plasma_state (); > > variable n = 3 ; % implied below. > > t.norm = Double_Type[n]; > t.norm[*] = 1.0; > t.temperature = 1.e6 + (1.e7 * [1:n])/n; > > variable Ne_Lines = where (el_ion(Ne,10) and wl(1.0, 40 ) ); > variable Mg_Lines = where (el_ion(Mg,12) and wl(1.0, 40 ) ); > > create_aped_fun ("xaped", t, &aped_hook); > > fit_fun ("xaped(1)"); > list_par; > > % Note that ISIS grids are in Angstroms ***** > % > variable w1, w2 ; > (w1, w2) = linear_grid( 1.0, 40.0, 8192); % about default MEG grid > variable xpar = [1,1,1,4333333,7666667,1.1e+07,1,0,0,1]; > > % set for only Ne lines: > % > aped_flag.line_list = Ne_Lines; > aped_flag.contrib_flag = MODEL_LINES; > > variable sne = eval_fun2("xaped",w1,w2,xpar); > hplot(w1,w2,sne); > > % set to Mg lines: > % > aped_flag.line_list = Mg_Lines; > variable smg = eval_fun2("xaped",w1,w2,xpar); > hplot(w1,w2,smg); > > % go back to full model: > % > aped_flag.line_list = NULL ; > aped_flag.contrib_flag = MODEL_LINES_AND_CONTINUUM; > variable sall = eval_fun2("xaped",w1,w2,xpar); > hplot(w1,w2,sall); > > > > -- Dave > > David Huenemoerder 617-253-4283 (o); -253-8084 (f); > http://space.mit.edu/home/dph > MIT Kavli Institute for Astrophysics and Space Research > One Hampshire Street, Room 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.hidden> with the first line of the message as: > unsubscribe > > ---- 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 20 2013 - 19:31:49 EDT
This archive was generated by hypermail 2.2.0 : Thu May 23 2013 - 15:55:17 EDT