------------------------------------------------------------------------ INSTRUCTIONS TO USE THE CODE FOR FITTING THE ULTRAVIOLET CONTINUUM GIVEN BY EQ. (1) IN THE SECTION 2.2. THE RESULTING PARAMETER IS THE NEUTRAL HYDROGEN COLUMN DENSITY, NH. ------------------------------------------------------------------------ CONTENT: FOLDER "/code1/": uvsed_v2.f - source file (in Fortran 77) of the code fitting the ultraviolet continuum of symbiotic stars given by Eq. (1) in Sect. 2.2. FOLDER "/data1/": example.in - input test data file: Selected fluxes of the ultraviolet continuum: $1 Wavelength in Angstroms (A), $2 Flux in erg/s/cm^2/A, $3 Error of the flux in erg/s/cm^2/A Example: The 'example.in' file here. ranges - input file with possible ranges of fitting parameters. Read by the code. Example: The 'ranges' file here. l_f - input file with oscillator strengths of the Lyman series for H lines. Read by the code. The 'l_f' file here. output1 - output file containing a grid of all model parameters given by all combinations of their ranges and steps. Written by the code into the file entered from the keyboard. Each line represents parameters of one model. Number of lines must be less than 1 million. output2 - output file containing a grid of the 200 best model parameters arranged according to the reduced xi^2 values. Written by the code into the file entered from the keyboard. model - resulting output file with the selected model SED: $1 Wavelength, $2 Rayleigh attenuated flux, $3 Non-attenuated flux, $4 Nebular coefficient, and corresponding fitting parameters. Written by the code into the file entered from the keyboard. example.flux - example of the spectrum for PU Vul as measured by the IUE satellite on October 3, 1988. The used spectrum represents the weighted average of SWP34405,SWP34406,SWP34407,LWP14173 and LWP14174 spectra according to their exposure time. example.gnu - gnuplot script for data and model visualisation. example.eps - output of the gnuplot script. Figure with the data and model SED. ------------------------------------------------------------------------ 1. SYSTEM REQUIREMENTS: Hardware requirements: standard computer OS requirements: Linux, Windows or MacOS The package has been tested on the following systems: Linux Mint 18.3, Centos 7, Windows 10 Pro v1909. Software requirements: Fortran 77 compiler or higher (f77, g77 or gfortran compiler). e.g., https://gcc.gnu.org/wiki/GFortran, http://simplyfortran.com/freetrial.html Gnuplot (for data visualisation with example.gnu script) or other data plotting software of your choice. No other installation for the code 'uvsed_v2' is required. ------------------------------------------------------------------------ 2. INSTALLATION GUIDE 2.1. Instructions: The code 'uvsed_v2' is written in Fortran 77 language. Compiler of the Fortran 77 is required. Instructions to install GFortran can be found, for example, at: https://fortran-lang.org/learn/os_setup/install_gfortran For Windows systems, GFortran can be used from within the Msys2 platform, see the installation instructions at: https://masuday.github.io/fortran_tutorial/install_gfortran_windows.html Then, the code 'uvsed_v2' can be compiled (installed) by: f77[g77, gfortran] uvsed_v2.f -o uvsed_v2 The gnuplot script 'example.gnu' can be run in the command line by command: gnuplot example.gnu The output example.eps file is then created, which is the figure with the data and model SED. 2.2. Typical Install time on a "normal" desktop computer: Fortran compilers: ~ minutes The code: < a few seconds. ------------------------------------------------------------------------ 3. DEMO 3.1. Instructions to run on data: The code works and is operated from the keyboard. From the directory with the data files (/data1/) we can call the code by /data1/ ../code1/uvsed_v2 (Linux) or /data1/ ../code1/uvsed_v2.exe (Windows) The code asks: 'Input - file with the measured fluxes: ' Here one put the file with testing points, 'example.in'. The code read the 'example.in', 'ranges' and 'l_f' files, and calculate a grid of all model parameters given by all combinations of their ranges and steps (here 14322). The code prints this number to the monitor and asks, 'Write all models to a file? [y/n]' When one selects 'y', the code asks for the name of the output file, 'Output - grid of all parameters: ' Here one put the file name with all 14322 model parameters, e.g., 'output1'. The code follows with a question, 'Output - grid of the 200 best model parameters: ', where one put the name of the file containing a grid of the 200 best model parameters arranged according to the reduced xi^2 values, e.g., 'output2'. Subsequently, the code displays the 10 best model parameters on the screen and asks for the number of the selected model to be calculated, 'Calculate the SED model No.: ', where one can put the number 1 to 200, but usually 1, because these parameters correspond to the smallest reduced xi^2 value as seen on the screen. Finally, the code asks, 'Output - file with the selected SED model: ' where one put the name of the file with the selected model SED, e.g., 'model'. 3.2. Expected output: The file 'model' is the resulting output file of the modelling. This file contains the wavelength, Rayleigh attenuated flux, non-attenuated flux and the nebular coefficient in the 1st, 2nd, 3rd and 4th column, respectively. The corresponding fitting parameters are written in the head of the file. The parameter 'NH' - the hydrogen column density - represents the primary and the only parameter needed for our analysis. To visualise the result the gnuplot figure 'example.eps' displays the example spectrum, 'example.flux' (magenta line), selected flux points (black crosses), and the model SED (black line) together with the nebular component of radiation (green line) and the stellar component of radiation (blue line). If the model does not fit spectrum well (also indicated with too large reduced xi^2 value), the code has to be run again using more appropriate 'ranges' of the model parameters that include the global minimum of the reduced xi^2 value. 3.3. Expected run time on a standard computer: code 'uvsed_v2': 10 seconds to calculate 14322 models of the ranges in the file 'ranges1' and the dataset 'example.in' (216 fluxes). 60 seconds to calculate 89856 models for the ranges in the file 'ranges2' and the same 'example.in' file. ------------------------------------------------------------------------ 4. INSTRUCTIONS FOR USE The measured ultraviolet continuum of symbiotic stars is compared with the model given by Eq. (1) in Sect. 2.2. For clarity, we rewrite Eq. (1) using denotations of fitting parameters as described in this 'readme_1.txt' file and outputs files of the code 'uvsed_v2' as follows: F(l) = kh*pi*B(Th)*exp(-sigma_Ray(l)NH + kn*epsilon(H,Te), where kh = (theta_WD)^2, pi=3.14159..., Th = T_BB, NH = N_H and kn = k_N. So, the fitting parameters are: kh, Th, NH, kn and Te. Their meaning is explained in the text of Sect. 2.2, following Eq. (1). The code 'uvsed_v2' calculates a grid of fitting parameters for all combinations of their values given by their ranges and steps in the file 'ranges'. To obtain an appropriate model SED, the ranges of parameters should contain a set of fitting parameters corresponding to the global minimum of the reduced xi^2 value. To satisfy this condition, it is recommended to prepare first a less dense grid for larger intervals of fitting parameters (here the file 'ranges1'). When all the fitting parameters are inside their given ranges and have a reasonable reduced xi^2 value (see the 'output2' file), one can prepare a more dense grid with smaller intervals of fitting parameters to obtain final set of their values. The resulting SED model, F(l), and corresponding fitting parameters are written in the file put from the keyboard (here, 'model'). Fitting parameters correspond to fluxes in 1E-13 erg/s/cm^2/A. To estimate the ranges of the scaling factor kh, it is useful to compare a Planck function to the measured spectrum plotted in flux units of 1E-13 erg/s/cm^2/A (see example in the 'example.gnu' file). Derivation of physical parameters from the model SED: NH is the only parameter needed for the analysis of this paper. Other parameters, kh, Th, kn and Te can be used to derive the angular (theta_WD) and effective (R^eff_WD) radii of the WD pseudophotosphere, its luminosity (L_WD) and the emission measure (EM) of the nebula. According to the used flux units (1E-13 erg/s/cm^2/A), the angular radius, theta_WD = sqrt(kh/pi/1E+5) = 3.99E-11, the effective radius, R^eff_WD = theta_WD * d = 5.79E+11 cm (d = 4.7 kpc), the luminosity, L_WD = 4*pi*(R^eff_WD)^2*5.67E-5*Th^4 = 3.82E+37 erg/s, and the emission measure, EM = kn*1E+15*4*pi*d^2 = 1.13E+61 cm-3 as given by fitting parameters in the 'model' file and d = 4.7 kpc (see Supplementary Table 2). A detailed explanation is given in [69]. ------------------------------------------------------------------------ SOFTWARE LICENCE: GNU General Public License v3.0 https://opensource.org/licenses/GPL-3.0 ------------------------------------------------------------------------