![]() |
evTools
Tools to manipulate and display output from the binary stellar-evolution code ev/STARS/TWIN
|
Shared modules, functions and subroutines for the evTools package. More...
Data Types | |
| module | ubvdata |
| Contains data to compute magnitudes and colours from L,T,g. More... | |
| module | constants |
| Contains the 'constants' used in the evTools package. More... | |
Functions/Subroutines | |
| subroutine | setconstants () |
| Define the 'constants' in the evTools package. More... | |
| subroutine | lt2ubv (logl, logt, mass, logz, mbol, bolc, mv, uminb, bminv, vminr, rmini) |
| Computes values of Mv, U-B, B-V and V-I for a star with given log L, log T, mass and log(Z/0.02) More... | |
| subroutine | num_sp_type_2_lt (sptyp, lumcl, lum, teff) |
| Convert spectral type and luminosity class to L, Teff using De Jager & Nieuwenhuijzen 1987. More... | |
| integer function | getos () |
| Determine the operating system type: 1-Linux, 2-MacOSX. More... | |
| character function, dimension(99) | findfile (match) |
| Find a file that matches match in the current directory. More... | |
| subroutine | findfiles (match, nff, all, fnames, nf) |
| Find files that match match in the current directory. More... | |
| subroutine | rswap (x, y) |
| Swap two real numbers. More... | |
| integer function | find_index (v, arr, narr) |
| Finds index of value v in monotonously increasing or decreasing array arr of length narr. More... | |
| subroutine | locate (arr, narr, v, i) |
| Locate the index of array arr such that v lies between arr(i) and arr(i+1) More... | |
| subroutine | locater (rarr, narr, rv, i) |
| Single-precision wrapper for of locate() More... | |
| real(double) function | a2j (m1, m2, a) |
| Convert orbital separation to orbital angular momentum. More... | |
| real(double) function | j2a (m1, m2, j) |
| Convert orbital angular momentum to orbital separation. More... | |
| real(double) function | p2j (m1, m2, p) |
| Convert orbital period to orbital angular momentum, all in cgs units. More... | |
| real(double) function | j2p (m1, m2, j) |
| Convert orbital angular momentum to orbital period, all in cgs units. More... | |
| subroutine | p2a (mtot, p, a) |
| Convert orbital period to orbital separation, in cgs units. More... | |
| subroutine | a2p (mtot, a, p) |
| Convert orbital separation to orbital period, in cgs units. More... | |
| real(double) function | a2rl (m1, m2, a) |
| Compute Roche-lobe radius, using Eggleton (1983) More... | |
| real(double) function | rl2a (m1, m2, rl1) |
| Convert Roche-lobe radius to orbital separation, using Eggleton (1983) More... | |
| real(double) function | p2rl (m1, m2, p) |
| Convert orbital period to Roche-lobe radius, all in cgs units. More... | |
| real(double) function | rl2p (m1, m2, rl1) |
| Convert Roche-lobe radius to orbital period, all in cgs units. More... | |
| subroutine | quit_program (message) |
| Print an exit message and stop the program. More... | |
| subroutine | bin_data_1d (n, x, norm, nbin, xmin1, xmax1, xbin, ybin) |
| Bin data in one dimension, by counting data points in each bin. More... | |
| real(double) function | time_stamp (os) |
| Get time stamp in seconds since 1970-01-01 00:00:00 UTC. More... | |
| subroutine | set_pgps_title (PSfile, PStitle) |
| Set the title in a Postscript file generated by PGPlot. More... | |
| subroutine | evtools_settings () |
| Read/create evTools settings file ~/.evTools. More... | |
| subroutine | pgxy2szrat_bitmap (x, y, size, ratio) |
| Convert PGPlot x,y dimensions to paper size and ratio for bitmap. More... | |
| subroutine | pgszrat2xy_bitmap (size, ratio, x, y) |
| Convert PGPlot x,y dimensions to paper size and ratio for bitmap. More... | |
| subroutine | pgxy2szrat_screen (horiz, vert, dpi, size, ratio) |
| Convert x,y screen dimensions to PGPlot paper size and ratio for a screen. More... | |
| subroutine | pgszrat2xy_screen (size, ratio, dpi, horiz, vert) |
| Convert PGPlot paper size and ratio to screen dimensions. More... | |
Shared modules, functions and subroutines for the evTools package.
For general functions and routines that need PGPlot, see plotfunctions.f90
| real(double) function a2j | ( | real(double), intent(in) | m1, |
| real(double), intent(in) | m2, | ||
| real(double), intent(in) | a | ||
| ) |
Convert orbital separation to orbital angular momentum.
| m1 | Mass 1 (Mo) |
| m2 | Mass 2 (Mo) |
| a | Orbital separation (Ro) |
| a2j | Orbital angular momentum (cgs) |
Referenced by read_bse().
| subroutine a2p | ( | real(double), intent(in) | mtot, |
| real(double), intent(in) | a, | ||
| real(double), intent(out) | p | ||
| ) |
Convert orbital separation to orbital period, in cgs units.
| mtot | Total mass of the binary (g) |
| a | Binary orbital separation (cm) |
| p | Binary period (s) |
Referenced by compute_mdl_variables(), j2p(), read_bse(), and rl2p().
| real(double) function a2rl | ( | real(double), intent(in) | m1, |
| real(double), intent(in) | m2, | ||
| real(double), intent(in) | a | ||
| ) |
Compute Roche-lobe radius, using Eggleton (1983)
| m1 | Mass 1 (arbitrary unit) |
| m2 | Mass 2 (same unit as m1) |
| a | Orbital separation (arbitrary unit) |
| a2rl | Roche-lobe radius of star 1 (same unit as a) |
Referenced by p2rl().
| subroutine bin_data_1d | ( | integer, intent(in) | n, |
| real, dimension(n), intent(in) | x, | ||
| integer, intent(in) | norm, | ||
| integer, intent(in) | nbin, | ||
| real, intent(inout) | xmin1, | ||
| real, intent(inout) | xmax1, | ||
| real, dimension(nbin+1), intent(out) | xbin, | ||
| real, dimension(nbin+1), intent(out) | ybin | ||
| ) |
Bin data in one dimension, by counting data points in each bin.
| n | Size of data array |
| x | Input data array |
| norm | Normalise (1) or not (0) |
| nbin | Number of bins |
| xmin1 | Minimum x value (left side of first bin (I/O: set xmin=xmax to auto-determine) |
| xmax1 | Maximum x value (right side of last bin (I/O: set xmin=xmax to auto-determine) |
| xbin | Binned data. The x values are the left side of the bin! |
| ybin | Binned data. |
| subroutine evtools_settings | ( | ) |
Read/create evTools settings file ~/.evTools.
References pgxy2szrat_screen().
Referenced by plotmdl(), plotmdln(), plotmod(), and plotplt().
| integer function find_index | ( | real(double), intent(in) | v, |
| real(double), dimension(narr), intent(in) | arr, | ||
| integer, intent(in) | narr | ||
| ) |
Finds index of value v in monotonously increasing or decreasing array arr of length narr.
| v | Value to match to arr (double) |
| arr | Array to match v to (double) |
| narr | Size of arr (integer) |
| find_index | Index for value v in array arr (integer) |
Referenced by lt2ubv().
| character function, dimension(99) findfile | ( | character, dimension(*), intent(in) | match | ) |
| subroutine findfiles | ( | character, dimension(*), intent(in) | match, |
| integer, intent(in) | nff, | ||
| integer, intent(in) | all, | ||
| character, dimension(99), intent(out) | fnames, | ||
| integer, intent(out) | nf | ||
| ) |
Find files that match match in the current directory.
| match | Search string to match |
| nff | Maximum number of files to return |
| all | 0-select manually from list, 1-always return all files in list |
| fnames | Array that contains the files found; make sure it has the same length as the array in the calling programme |
| nf | The actual number of files returned in fnames ( = min(number found, nff)) |
References system().
Referenced by plotplt(), plt2ce(), plt2dat(), plt2obs(), and selplt().
| integer function getos | ( | ) |
Determine the operating system type: 1-Linux, 2-MacOSX.
References system().
| real(double) function j2a | ( | real(double), intent(in) | m1, |
| real(double), intent(in) | m2, | ||
| real(double), intent(in) | j | ||
| ) |
Convert orbital angular momentum to orbital separation.
| m1 | Mass 1 (Mo) |
| m2 | Mass 2 (Mo) |
| j | Orbital angular momentum (cgs) |
| j2a | Orbital separation (Ro) |
| real(double) function j2p | ( | real(double), intent(in) | m1, |
| real(double), intent(in) | m2, | ||
| real(double), intent(in) | j | ||
| ) |
Convert orbital angular momentum to orbital period, all in cgs units.
| m1 | Mass 1 (g) |
| m2 | Mass 2 (g) |
| j | Orbital angular momentum (cgs) |
| j2p | Orbital period (s) |
References a2p().
| subroutine locate | ( | real(double), dimension(narr), intent(in) | arr, |
| integer, intent(in) | narr, | ||
| real(double), intent(in) | v, | ||
| integer, intent(out) | i | ||
| ) |
Locate the index of array arr such that v lies between arr(i) and arr(i+1)
| arr | monotonic array (double) |
| narr | length of arr (integer) |
| v | value to look for (double) |
| i | returned index, such that v is between arr(i) and arr(i+1). If i=0 or narr, v is out of range |
| subroutine locater | ( | real, dimension(narr), intent(in) | rarr, |
| integer, intent(in) | narr, | ||
| real, intent(in) | rv, | ||
| integer, intent(out) | i | ||
| ) |
| subroutine lt2ubv | ( | real(double), intent(in) | logl, |
| real(double), intent(in) | logt, | ||
| real(double), intent(in) | mass, | ||
| real(double), intent(in) | logz, | ||
| real(double), intent(out) | mbol, | ||
| real(double), intent(out) | bolc, | ||
| real(double), intent(out) | mv, | ||
| real(double), intent(out) | uminb, | ||
| real(double), intent(out) | bminv, | ||
| real(double), intent(out) | vminr, | ||
| real(double), intent(out) | rmini | ||
| ) |
Computes values of Mv, U-B, B-V and V-I for a star with given log L, log T, mass and log(Z/0.02)
| logl | 10-log of the stellar luminosity/Lo |
| logt | 10-log of the effective temperature/K |
| mass | stellar mass (Mo) |
| logz | 10-log of Z/0.02 |
| mbol | Bolometric magnitude |
| bolc | Bolometric correction |
| mv | Visual absolute magnitude |
| uminb | Colour U-B |
| bminv | Colour B-V |
| vminr | Colour V-I |
| rmini | Colour R-I |
Needs one of:
References find_index().
Referenced by changepltvars(), findplt(), listplt(), and plt2obs().
| subroutine num_sp_type_2_lt | ( | real(double), intent(in) | sptyp, |
| real(double), intent(in) | lumcl, | ||
| real(double), intent(out) | lum, | ||
| real(double), intent(out) | teff | ||
| ) |
Convert spectral type and luminosity class to L, Teff using De Jager & Nieuwenhuijzen 1987.
| sptyp | Spectral type (0.0-8.5 for O0-M10) |
| lumcl | Lumonosity class (0.0-5.0 for Ia+-V) |
| lum | Luminosity (Lo) |
| teff | Effective temperature (K) |
| subroutine p2a | ( | real(double), intent(in) | mtot, |
| real(double), intent(in) | p, | ||
| real(double), intent(out) | a | ||
| ) |
Convert orbital period to orbital separation, in cgs units.
| mtot | Total mass of the binary (g) |
| p | Binary period (s) |
| a | Binary orbital separation (cm) |
Referenced by changepltvars(), p2j(), and p2rl().
| real(double) function p2j | ( | real(double), intent(in) | m1, |
| real(double), intent(in) | m2, | ||
| real(double), intent(in) | p | ||
| ) |
Convert orbital period to orbital angular momentum, all in cgs units.
| m1 | Mass 1 (g) |
| m2 | Mass 2 (g) |
| p | Orbital period (s) |
| p2j | Orbital angular momentum (cgs) |
References p2a().
| real(double) function p2rl | ( | real(double), intent(in) | m1, |
| real(double), intent(in) | m2, | ||
| real(double), intent(in) | p | ||
| ) |
| subroutine pgszrat2xy_bitmap | ( | real, intent(in) | size, |
| real, intent(in) | ratio, | ||
| integer, intent(out) | x, | ||
| integer, intent(out) | y | ||
| ) |
Convert PGPlot x,y dimensions to paper size and ratio for bitmap.
| size | PGPlot plot size |
| ratio | PGPlot plot ratio |
| x | Horizontal plot size in pixels |
| y | Vertical plot size in pixels |
| subroutine pgszrat2xy_screen | ( | real, intent(in) | size, |
| real, intent(in) | ratio, | ||
| integer, intent(in) | dpi, | ||
| integer, intent(out) | horiz, | ||
| integer, intent(out) | vert | ||
| ) |
Convert PGPlot paper size and ratio to screen dimensions.
| size | PGPlot screen size |
| ratio | PGPlot screen ratio |
| dpi | Screen resolution in dots per inch |
| horiz | Horizontal screen size (pixels) |
| vert | Vertical screen size (pixels) |
| subroutine pgxy2szrat_bitmap | ( | integer, intent(in) | x, |
| integer, intent(in) | y, | ||
| real, intent(out) | size, | ||
| real, intent(out) | ratio | ||
| ) |
Convert PGPlot x,y dimensions to paper size and ratio for bitmap.
| x | Horizontal plot size in pixels |
| y | Vertical plot size in pixels |
| size | PGPlot plot size |
| ratio | PGPlot plot ratio |
| subroutine pgxy2szrat_screen | ( | integer, intent(in) | horiz, |
| integer, intent(in) | vert, | ||
| integer, intent(in) | dpi, | ||
| real, intent(out) | size, | ||
| real, intent(out) | ratio | ||
| ) |
Convert x,y screen dimensions to PGPlot paper size and ratio for a screen.
| horiz | Horizontal screen size (pixels) |
| vert | Vertical screen size (pixels) |
| dpi | Screen resolution in dots per inch |
| size | PGPlot screen size |
| ratio | PGPlot screen ratio |
Referenced by evtools_settings().
| subroutine quit_program | ( | character, dimension(*), intent(in) | message | ) |
Print an exit message and stop the program.
| message | Exit message |
Referenced by copy_mod(), listmdl(), read_bse(), and read_plt().
| real(double) function rl2a | ( | real(double), intent(in) | m1, |
| real(double), intent(in) | m2, | ||
| real(double), intent(in) | rl1 | ||
| ) |
Convert Roche-lobe radius to orbital separation, using Eggleton (1983)
| m1 | Mass 1 (arbitrary unit) |
| m2 | Mass 2 (same unit as m1) |
| rl1 | Roche-lobe radius of star 1 (arbitrary unit) |
| rl2a | Orbital separation (same unit as rl1) |
Referenced by compute_mdl_variables(), and rl2p().
| real(double) function rl2p | ( | real(double), intent(in) | m1, |
| real(double), intent(in) | m2, | ||
| real(double), intent(in) | rl1 | ||
| ) |
| subroutine rswap | ( | real, intent(inout) | x, |
| real, intent(inout) | y | ||
| ) |
Swap two real numbers.
| x | Real number 1 |
| y | Real number 2 |
| subroutine set_pgps_title | ( | character, dimension(*), intent(in) | PSfile, |
| character, dimension(*), intent(in) | PStitle | ||
| ) |
| subroutine setconstants | ( | ) |
| real(double) function time_stamp | ( | integer, intent(in) | os | ) |
Get time stamp in seconds since 1970-01-01 00:00:00 UTC.
| os | Operating system: 1-Linux, 2-BSD/MacOS |
References system().
1.8.5