yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

functions in drat.i - d

 
 
 
default_gate


             default_gate(times)  
 
     initial value of drat_gate.  Refer to the source code  
     to learn how to write your own gate function, making proper use  
     of drat_start and drat_stop options in addition to the input times.  
interpreted function, defined at i0/drat.i   line 772  
SEE ALSO: gauss_gate,   drat_gate  
 
 
 
default_integrate


             atten_emit= default_integrate(f, mesh, time, irays, slimits)  
 
     is the default drat_integrate routine.  
     On entry, file F is positioned at TIME, from which MESH has already  
     been read.  IRAYS and SLIMITS are the rays coordinates (in internal  
     format) and integration limits.  
     The result should be ngroup-by-2-by-raydims, where the second index  
     is 1 for the attenuation factor, 2 for the self-emission (specific  
     intensity due to emission along the ray).  
   OPTIONS: drat_linear, drat_ocompute, drat_oadjust,  
            drat_emult, drat_amult, drat_omult, drat_nomilne,  
            drat_ekap, drat_akap, drat_glist  
interpreted function, defined at i0/drat.i   line 167  
SEE ALSO: streak  
 
 
 
default_ocompute


             default_ocompute(f, time)  
 
     initial value of drat_ocompute.  Extracts drat_akap and drat_ekap  
     from file F, possibly using the subset drat_glist.  TIME is unused.  
interpreted function, defined at i0/drat.i   line 717  
 
 
 
drat_akap


 drat_akap  
 
keyword,  defined at i0/drat.i   line 445  
SEE drat_rt  
 
 
 
drat_amult


             drat_amult, drat_emult, drat_omult  
 
     are optional opacity multipliers used by the streak, snap, and  
     streak_save functions.  The multipliers are applied to the  
     opacity and source functions before the transport equation is  
     integrated.  Setting them to [] is the same as setting them  
     to 1.0.  
     DRAT_EMULT     - multiply the emissivity by this factor,  
                         without affecting the absorption  
            opac   <- opac  
            source <- source*DRAT_EMULT  
     DRAT_AMULT   - multiply the absorption opacity by this  
                         factor, without affecting the emissivity  
            opac   <- opac*(DRAT_AMULT+1.e-20)  
            source <- source/(DRAT_AMULT+1.e-20)  
     DRAT_OMULT      - multiply BOTH the absorption opacity and the  
                         emissivity by this factor  
            opac   <- opac*DRAT_OMULT  
            source <- source  
     DRAT_IREG_ADJ   - list of region numbers to be zeroed.  This  
                       has the same effect as a zero DRAT_OMULT in  
                       the corresponding zones, but is more efficient.  
     Since opac and source are mesh-by-ngroup (where mesh is usually  
     kmax-by-lmax), DRAT_EMULT, DRAT_AMULT, DRAT_OMULT can  
     be scalars, mesh arrays, 1-by-1-by-ngroup arrays, or  
     kmax-by-lmax-by-ngroup arrays.  If DRAT_GLIST is non-nil, ngroup  
     should be numberof(DRAT_GLIST), not the total number of groups.  
keyword,  defined at i0/drat.i   line 484  
SEE ALSO: drat_glist,   adjust_ireg  
 
 
 
drat_backlight


             func drat_backlight(time) { extern gb, gav;  ... }  
          or drat_backlight=   
          or drat_backlight=   
 
     supplies a backlighter for the snap function.  
     Given ngroup-by-nrays transparency fraction transp and self-emission  
     selfem (in specific intensity units), snap applies the backlighter  
     using:  
        result= backlighter*transp + selfem;  
     where backlighter is drat_backlight(time), if drat_backlight is  
     a function, or drat_backlight itself, if drat_backlight is an  
     array.  
     Note that the result (or value) of backlighter_func must be  
     conformable with transp and selfem.  Most commonly, drat_backlight  
     will be a vector of length ngroup -- a Planckian backlighter at  
     temperature Tr would be  
        drat_backlight= B_nu(gav, Tr);  
     -- but that a scalar, 1-by-nrays, or ngroup-by-nrays are all  
     possible.  
     Note also that if drat_backlight is a function, the gb and gav  
     arrays read from the history file are available as external  
     variables.  
keyword,  defined at i0/drat.i   line 584  
SEE ALSO: snap,   drat_channel,   drat_gate,   apply_funcs  
 
 
 
drat_channel


             func drat_channel(time) { extern gb, gav;  ... }  
          or drat_channel=   
          or drat_channel=   
 
     supplies a channel response for the snap function.  
     Use the drat_glist option to select a subset of the groups;  
     drat_channel can be used in addition to drat_glist.  
     Given ngroup-by-nrays specific intensity, snap applies the  
     channel response using:  
        result= drat_channel(..,+)*specific_intensity(+,..);  
     if drat_channel is an array, or  
        result= drat_channel(specific_intensity, time);  
     if drat_channel is a function.  
     Note that if drat_channel is an array, its final dimension must  
     be of length ngroup.  A multidimensional drat_channel represents  
     more than one channel response function.  Most drat_channel  
     arrays will be proportional to the bin widths gb(dif).  The  
     correct way to interpolate a filter function transmission  
     fraction known at photon enrgies efa is:  
        drat_channel= integ(ffa, efa, f.gb)(dif)  
     If you have more than one channel, the first dimension of  
     drat_channel should be the channel number.  
     The best way to generate a filter response function is to  
     use Yorick's cold opacity library.  To do this:  
        #include "coldopac/xray.i"  
     This will define the functions cold_opacity and cold_reflect,  
     which you can use to build up channel response functions from  
     filter materials and thicknesses and mirror compositions.  
     Note also that if drat_channel is a function, the gb and gav  
     arrays read from the history file are available as external  
     variables.  
keyword,  defined at i0/drat.i   line 612  
SEE ALSO: drat_glist,   snap,   drat_backlight,   drat_gate,  
apply_funcs  
 
 
 
drat_compress


             func drat_compress(transp, selfem, time)  
          or drat_compress=   
 
     supplies a compression algorithm to the streak function.  
     The drat_compress can return anything, as long as it returns the  
     same shape array (or nil) at each time.  The snap_worker and  
     streak_saver routines are examples of compression algorithms.  
keyword,  defined at i0/drat.i   line 575  
 
 
 
drat_ekap


 drat_ekap  
 
keyword,  defined at i0/drat.i   line 445  
SEE drat_rt  
 
 
 
drat_emult


 drat_emult  
 
keyword,  defined at i0/drat.i   line 484  
SEE drat_amult  
 
 
 
drat_gate


             func drat_gate(times) { extern gb, gav;  ... }  
          or drat_gate=   
 
     supplies a gate (to make gated images) for the snap function.  
     For a simple gate, the drat_start and drat_stop options will  
     be more efficient than drat_gate.  
     The input to drat_gate is the list of dump times; the output  
     should be the "effective dt" for each of these dumps.  This is  
     the product of the actual time interval and the gate transparency;  
     the sum of the return vector is the gate time.  See the default_gate  
     and gaussian_gate functions for examples.  
     Note that the gb and gav arrays read from the history file are  
     available as external variables, in case the gate transparency is  
     frequency dependent.  
keyword,  defined at i0/drat.i   line 652  
SEE ALSO: snap,   drat_backlight,   drat_channel,  
apply_funcs,   drat_start,   drat_stop,  
gaussian_gate,   default_gate  
 
 
 
drat_gav


 drat_gav  
 
keyword,  defined at i0/drat.i   line 445  
SEE drat_rt  
 
 
 
drat_gb


 drat_gb  
 
keyword,  defined at i0/drat.i   line 445  
SEE drat_rt  
 
 
 
drat_glist


             drat_glist  
 
     if non-nil, an index list into the final dimension of akap and ekap.  
     Only these groups will be read from disk and used in the transport  
     calculation.  All other options which depend on "ngroup" or "gav"  
     should use numberof(DRAT_GLIST) or gav(DRAT_GLIST) instead.  The  
     "gb" group boundary array is not well-defined in this case, since  
     the group boundaries need not be contiguous.  The best strategy is  
     to save drat_glist and the original gb array.  
     DRAT_GLIST must be a 1-D, 1-origin index list.  (1-origin even if  
     gav and gb are not 1-origin, since use_origins(0) will be in effect  
     when DRAT_GLIST is used.)  The streak function will be most efficient  
     if DRAT_GLIST is strictly increasing.  
keyword,  defined at i0/drat.i   line 531  
SEE ALSO: drat_channel  
 
 
 
drat_integrate


             func drat_integrate(file, mesh, time, irays, slimits) { ... }  
          or drat_integrate=   
 
     integrate the transport equation.  FILE is positioned to TIME, and  
     MESH has already been read.  IRAYS are the rays in internal format  
     and SLIMITS is the integration limits.  The return value should be  
     ngroup-by-2-by-raydims (where irays is 6-by-raydims).  The default  
     integrator is default_integrate, which handles the drat_ocompute,  
     drat_oadjust, drat_amult, drat_emult, drat_omult, drat_akap,  
     drat_ekap, drat_glist, drat_linear, and drat_nomilne options.  
     Reasons to replace the default routine include: (1) Some or all of  
     the opacities come from a source other than the FILE, e.g.- a second  
     post processing file.  (2) The total number of zones times number of  
     groups is debilitatingly large, even though the number of rays times  
     the number of groups is not.  
keyword,  defined at i0/drat.i   line 693  
 
 
 
drat_ireg


 drat_ireg  
 
keyword,  defined at i0/drat.i   line 445  
SEE drat_rt  
 
 
 
drat_ireg_adj


 drat_ireg_adj  
 
keyword,  defined at i0/drat.i   line 484  
SEE drat_amult  
 
 
 
drat_isymz


 drat_isymz  
 
keyword,  defined at i0/drat.i   line 445  
SEE drat_rt  
 
 
 
drat_khold


 drat_khold  
 
keyword,  defined at i0/drat.i   line 445  
SEE drat_rt  
 
 
 
drat_lhold


 drat_lhold  
 
keyword,  defined at i0/drat.i   line 445  
SEE drat_rt  
 
 
 
drat_linear


             drat_linear, drat_nomilne  
 
     Set DRAT_LINEAR to 1 in order to use integ_linear to perform the  
     transport integration instead of the default integ_flat.  
     The DRAT_NOMILNE option, if non-nil, is a list of "norad"  
     edges in the (rt,zt) mesh (other than the khold and lhold lines),  
     which is required for the source function point centering operation.  
     DRAT_NOMILNE is a 2 or 3-D array with the format:  
        [[k1,l1], [k2,l2]]  
     or an array of elements of that form, where either k1==k2 or  
     l1==l2.  (Where k is the first index of rt or zt and l is the second.)  
     DRAT_NOMILNE must always be a 1-origin index list into the (rt,zt)  
     mesh, independent of the index origins of rt and/or zt.  
keyword,  defined at i0/drat.i   line 549  
SEE ALSO: integ_linear,   integ_flat  
 
 
 
drat_nomilne


 drat_nomilne  
 
keyword,  defined at i0/drat.i   line 549  
SEE drat_linear  
 
 
 
drat_oadjust


 drat_oadjust  
 
keyword,  defined at i0/drat.i   line 673  
SEE drat_ocompute  
 
 
 
drat_ocompute


             func drat_ocompute(file, time) { extern opac, source; ...}  
          or drat_ocompute=   
 
        and func drat_oadjust(file, time) { extern opac, source; ...}  
         or drat_oadjust=   
     supply opacities from a source other than the file.drat_akap and  
     file.drat_ekap, or adjust these values.  You need to be cognizant of  
     the drat_glist option (see get_kaps source code).  
     DRAT_OCOMPUTE must set opac and source entirely on its own;  
     DRAT_OADJUST will be called afterwards.  
     The default DRAT_OCOMPUTE (default_ocompute) reads drat_akap and  
     drat_ekap from FILE, optionally extracting drat_glist, and places  
     them in opac and source.  
     DRAT_OADJUST is free to modify opac and source them at will; the  
     default DRAT_OADJUST is nil, which means no adjustment.  
     Any opacity or emissivity multipliers will be applied after  
     DRAT_OADJUST, as will the point centering operation if necessary  
     (DRAT_OADJUST should return zone centered opacities).  
keyword,  defined at i0/drat.i   line 673  
 
 
 
drat_omult


 drat_omult  
 
keyword,  defined at i0/drat.i   line 484  
SEE drat_amult  
 
 
 
drat_quiet


             drat_quiet  
 
     By default, Drat prints the total number of records it will process,  
     and the number of the record it is currently processing.  If drat_quiet  
     is non-nil and non-zero, the printout is supressed.  
keyword,  defined at i0/drat.i   line 710  
 
 
 
drat_rt


             drat_rt, drat_zt, drat_ireg,  
             drat_akap, drat_ekap,  
             drat_isymz,  
             drat_khold, drat_lhold,  
             drat_gb, drat_gav  
 
     can be set to strings other than "rt", "zt", etc. (their default  
     values) to force the streak, snap, and streak_save routines to use  
     alternative names to look up these quantites in the history file.  
     The following 4 variables are NOT optional:  
     (rt, zt) must be a 2-D mesh in cylindrical coordinates  
     akap is a mesh-by-ngroup array of absorption opacities, in units  
          of reciprocal length (1/rt or 1/zt)  
     ekap is a mesh-by-ngroup array of source functions, in (arbitrary)  
          specific intensity units  
     The akap and ekap arrays must be zone centered; the first row and  
     column of akap and ekap will be ignored.  
     The remaining variables are all optional -- set the drat_.. variable  
     to [] to ignore them completely.  Otherwise, they will be ignored if  
     they are not present in the history file, and used as follows  
     otherwise:  
     ireg is a mesh-size region number array (zone centered as akap and  
          ekap).  Zones where ireg==0 do not exist.  
     isymz is non-zero if the problem has reflection symmetry about z=0,  
          zero otherwise.  The drat_symmetry option overrides this value.  
     khold and lhold are mesh indices specifying "hold lines" --  
          khold is an index into the first dimension of (rt,zt), and  
          lhold is an index into the second dimension of (rt,zt).  
          These are used only if the drat_linear option is specified.  
     gb and gav are, respectively, the group boundary energies and group  
          center energies.  These are used by the snap and streak_save  
          functions.  
keyword,  defined at i0/drat.i   line 445  
SEE ALSO: streak,   snap,   streak_save,   drat_symmetry,  
drat_linear  
 
 
 
drat_start


             drat_start, drat_stop  
 
     if non-nil, specify the minimum and maximum dump times which will  
     be considered by the streak, snap, or streak_save functions.  
keyword,  defined at i0/drat.i   line 518  
 
 
 
drat_static


             drat_static  
 
     if non-nil, a list of strings representing variable names in the  
     input file which the streak_save function should copy to the  
     output file.  
keyword,  defined at i0/drat.i   line 567  
SEE ALSO: streak_save  
 
 
 
drat_stop


 drat_stop  
 
keyword,  defined at i0/drat.i   line 518  
SEE drat_start  
 
 
 
drat_symmetry


             drat_symmetry  
 
     set to 2 to force spherical symmetry, 1 to force reflection symmetry  
     about the z=0 plane, 0 to force no symmetry, [] (the default) to  
     use the guess_symmetry function to compute problem symmetry.  
keyword,  defined at i0/drat.i   line 524  
 
 
 
drat_zt


 drat_zt  
 
keyword,  defined at i0/drat.i   line 445  
SEE drat_rt