% -*- mode: SLang; mode: fold -*- % % Prototype .isisrc file for user customization. % % ---------------------------------- % - - - Traceback selection: %%_traceback=0; % No traceback output (for interactive) _traceback=4; % Traceback output enabled (see help _traceback) % - - - Tell user what's happening... message(" - - - - -"); message(" Doing things in "+getenv("HOME")+"/.isisrc ... "); message(" - - - - -"); % - - - Very basic things % Set the format for the string function: set_float_format("%.6g"); % - - - Additional physical constants public variable Const_pc = 3.0857e18; % cm public variable Const_AU = 149.6e9*100.0; % cm public variable Const_yr = 365.24 * 24.0 * 3600.0; % s / year public variable Const_SM = 1.98892e33; % g / solar mass public variable Const_amu = 1.66054e-24; % g / amu public variable Const_c_kms = Const_c * 1.e-5; % c in km/s % - - - ADED databse related: % Optionally load the APED-2(beta) database: %%%%% autoload ("aped2", "aped2.sl"); % - - - Plotting things... putenv ("PGPLOT_BACKGROUND=white"); putenv ("PGPLOT_FOREGROUND=black"); set_frame_line_width (3); set_line_width (5); % plot_unit("Angstrom"); Isis_Residual_Plot_Type=RATIO; Label_By_Default = 1; Ion_Format = FMT_ROMAN; % - - - Fitting/statistics related: % default for some things - % these can be overridden in user script etc as desired. set_fit_method("lmdif;default"); % good for smooth chi^2 space %% set_fit_method("minim;default"); % for complex chi^2 space % % I used to favor this... %%set_fit_statistic("chisqr;sigma=gehrels"); % but this is better: set_fit_statistic("chisqr;sigma=model"); % Even better, use sigma^2 = 0.37*data + 0.63*model. % See $SCI/SN1987A/isis_110101/set_hybrid_statistic.sl % Minimum_Stat_Err = 1.e-30; Fit_Verbose = 0; % % mpfit's default relstep value is now specified % on a per-parameter basis and may be user-specified. % For xspec functions, the default is set by the intrinsic: %% Isis_Default_Relstep = 1.e-4 % which defaults to 1.e-4. % - - - Multi-core related: % Set this so I don't melt my MacBook ;-) %% Isis_Slaves.num_slaves=1; % For spectra use up 6 x2 threads (out of 2x4 x2 threads): Isis_Slaves.num_slaves=12; Isis_Slaves.nice=10; % - - - Initialize the random seed seed_random(_time()); % - - - Other user-defined options set_readline_method ("slang"); % Isis_Append_Semicolon=0; Ignore_PHA_Response_Keywords=1; % turn off evil feature (dph) Incomplete_Line_List = 1; Verbose_Fitsio = 0; Isis_List_Filenames=0; % - - - Spectral Database related require("xspec"); % default "NEIVERS" for XSPEC nei models: % (also use the Borkowski version of the 2.0 APEC files, % see: http://space.mit.edu/home/dd/Borkowski/ ) xspec_xset("NEIVERS", "2.0"); % gsmooth Index range extended: __set_hard_limits ("gsmooth", "Index", -2.0, 2.0); % hard limits - arg __set_hard_limits("vnei","kT",0.0808,1.0e3); __set_hard_limits("vnei","H",0.0,1.e13); __set_hard_limits("vnei","He",0.0,1.e13); __set_hard_limits("vnei","C",0.0,1.e13); __set_hard_limits("vnei","N",0.0,1.e13); __set_hard_limits("vnei","O",0.0,1.e13); __set_hard_limits("vnei","Ne",0.0,1.e13); __set_hard_limits("vnei","Mg",0.0,1.e13); __set_hard_limits("vnei","Si",0.0,1.e13); __set_hard_limits("vnei","S",0.0,1.e13); __set_hard_limits("vnei","Ar",0.0,1.e13); __set_hard_limits("vnei","Ca",0.0,1.e13); __set_hard_limits("vnei","Fe",0.0,1.e13); __set_hard_limits("vnei","Ni",0.0,1.e13); __set_hard_limits("vnei","Redshift",-0.999,10.0); % __set_hard_limits("vgnei","kT",0.0808,1.0e3); __set_hard_limits("vgnei","H",0.0,1.e13); __set_hard_limits("vgnei","He",0.0,1.e13); __set_hard_limits("vgnei","C",0.0,1.e13); __set_hard_limits("vgnei","N",0.0,1.e13); __set_hard_limits("vgnei","O",0.0,1.e13); __set_hard_limits("vgnei","Ne",0.0,1.e13); __set_hard_limits("vgnei","Mg",0.0,1.e13); __set_hard_limits("vgnei","Si",0.0,1.e13); __set_hard_limits("vgnei","S",0.0,1.e13); __set_hard_limits("vgnei","Ar",0.0,1.e13); __set_hard_limits("vgnei","Ca",0.0,1.e13); __set_hard_limits("vgnei","Fe",0.0,1.e13); __set_hard_limits("vgnei","Ni",0.0,1.e13); __set_hard_limits("vgnei","Redshift",-0.999,10.0); __set_hard_limits("vgnei","",0.0808,1.0e3); % __set_hard_limits("vpshock","kT",0.0808,1.0e3); __set_hard_limits("vpshock","H",0.0,1.e13); __set_hard_limits("vpshock","He",0.0,1.e13); __set_hard_limits("vpshock","C",0.0,1.e13); __set_hard_limits("vpshock","N",0.0,1.e13); __set_hard_limits("vpshock","O",0.0,1.e13); __set_hard_limits("vpshock","Ne",0.0,1.e13); __set_hard_limits("vpshock","Mg",0.0,1.e13); __set_hard_limits("vpshock","Si",0.0,1.e13); __set_hard_limits("vpshock","S",0.0,1.e13); __set_hard_limits("vpshock","Ar",0.0,1.e13); __set_hard_limits("vpshock","Ca",0.0,1.e13); __set_hard_limits("vpshock","Fe",0.0,1.e13); __set_hard_limits("vpshock","Ni",0.0,1.e13); __set_hard_limits("vpshock","Redshift",-0.999,10.0); % __set_hard_limits("vmekal","kT",0.0808,1.0e3); __set_hard_limits("vmekal","He",0.0,1.e13); __set_hard_limits("vmekal","C",0.0,1.e13); __set_hard_limits("vmekal","N",0.0,1.e13); __set_hard_limits("vmekal","O",0.0,1.e13); __set_hard_limits("vmekal","Ne",0.0,1.e13); __set_hard_limits("vmekal","Mg",0.0,1.e13); __set_hard_limits("vmekal","Si",0.0,1.e13); __set_hard_limits("vmekal","S",0.0,1.e13); __set_hard_limits("vmekal","Ar",0.0,1.e13); __set_hard_limits("vmekal","Ca",0.0,1.e13); __set_hard_limits("vmekal","Fe",0.0,1.e13); __set_hard_limits("vmekal","Ni",0.0,1.e13); % - - - Paths % Can add to search paths with commands: % [add|append|prepend]_to_isis_load_path ("/my/home/lib"); % [add|append|prepend]_to_isis_module_path ("/my/home/modules"); % % Point to any S-Lang-installed modules as well: % on Mac: %%prepend_to_isis_load_path ("/usr/local/share/slsh/local-packages"); %%prepend_to_isis_module_path ("/usr/local/lib/slang/v2/modules"); % % Add some additional items to the isis distribution, e.g.: % on MacBook: %%static variable isis_extras_path="/usr/local/src/isis_extras"; % on NE80 machines: static variable isis_extras_path="/nfs/cxc/h3/dd/hy3d/Isis_Extras"; % prepend_to_isis_load_path(".:"+isis_extras_path); % - - - Loading other isis/slang stuff from specific files: % () = evalfile ("/my/home/other/routine.sl"); % - - - Examples of more advanced startup things % Can check if a routine is present and do things, e.g., % #ifexists set_readline_method % set_readline_method ("slang"); % #else % #endif % or if not present do things: % #ifnexists prepend_to_slang_load_path % define prepend_to_slang_load_path (s) % { % prepend_to_isis_load_path (s); % } % #endif % % Can read a system environment variable: % getenv ("HOME") % - - - Traceback selection: %%_traceback=0; % No traceback output (for interactive) _traceback=4; % Show all Traceback output enabled % -------------------------------------------