% -*- mode: SLang; mode: fold -*- % % Prototype .isisrc file for user customization. 5/10/12 % % ---------------------------------- % - - - 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: % % - - - 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 % % I used to favor this... %%set_fit_statistic("chisqr;sigma=gehrels"); % but this is better: set_fit_statistic("chisqr;sigma=model"); % Minimum_Stat_Err = 1.e-30; Fit_Verbose = 0; % - - - Multi-core related: % Limit number of threads, e.g., so I don't melt my MacBook ;-) %% Isis_Slaves.num_slaves=1; % For a quad-dual-core linux box, % use up to 6 x2 threads (out of max 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; % - - - Re: XSPEC Spectral Models 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); % If needed, redefine the hard limits for some XSPEC % spectral models, e.g., % __set_hard_limits("vnei","kT",0.0808,1.0e3); % __set_hard_limits("vnei","H",0.0,1.e13); % __set_hard_limits("vnei","Redshift",-0.999,10.0); % - - - Paths % Can add to isis's search paths with commands: % [add|append|prepend]_to_isis_load_path ("/my/home/lib"); % [add|append|prepend]_to_isis_module_path ("/my/home/modules"); % % Define where "isis extras" are kept: 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: % Load other files on isis startup? % () = 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 % -------------------------------------------