-
Notifications
You must be signed in to change notification settings - Fork 0
Python Versions pre 74a
The following is taken from the Confluence site and is the notes on release pre GitHub.
Downloads of these versions can be found under Tags
It would be nice if we knew how the various versions of Python were changing, but we have not been consistent regarding this, and it is extremely difficult to reconstruct. Our aim is to do better in future, as more people begin to use the code
These notes are taken from the Confluence Wiki. Note that when STScI changed to Confluence, they did not actually move the files there. Instead they placed links to location where they archived the old wiki. These may have different names and passwords than you used to get to this site. Contact Knox if you do not know yours. There seems to be no way around this problem
The Long and Knigge 2002 paper was submitted in June 2002 (and accepted quickly), and this was the same time period and the versions during this period ranged from Python_40 to Python_44.
python_58 - This version of the software that was completed in October 2006, and is regarded as stable z.python_58.061027.tar.gz (121224 - copied from archive site)
Note - If starting a new project, it would be sensible to user a newer version, and return to this version if something looks "wrong". If a difference is found, please report it.
Unfortunately, we have not documented the changes that have been made to the Python code very well. Much of the documentation that does exist is actually in the code. A bit more exists on Knox's web pages. We need to do better in future)
Precursor - py67c Changes: includes the first attempt at dealing with the inner shell photoionization/Auger effect as a means to make high ions Note on this are on a different page InShlIon This is preliminary only - ionization balance is not self-consistent and the photoionization process doesn't actually remove photons (it's just used to compute an ionization rate) It is not tested - I've checked that it runs but haven't yet done any checks on whether the results are reasonable
Precursor - py68 Changes Logging - introduced what amounts to a verbosity parameter to allow the user to control what level of verbosity, s/he wants. The verbosity is controlled by a new switch -v which takes a number. -v 1 is low verbosity -v 9 is high. The default level of verbosity currently suppresses recording of Log_silent and Error_silent. This version of python requires a new version of kpar (in order to allow us to see what is produced in this mode. kpar contains a new routine Log_verbosity to set the verbosity level. One can use this within routines to change the amount of information printed out for the specific regions of the program one wants to debug. A routine Shout was also added to kpar which allows one to force a print out. Added tracking of what ions scatter and what ions absorb during the creation of the detailed spectrum. The idea behind this was to give one a way to see what portions of the wind are important to create a line. This was done by adding two new arrrays to Plasma, one which can capture the number of scatters made by each ion, the other which trackts the energy scattered out of the line of sight to the observer for the "middle" inclination angle by ion and location in the wind. The idea is that you should be able to see where along the line of sight one each ion is scattering. Most of the modifications for this are in extract.c (and in phot_util.c). Note - this needs more testing Py_wind - I added the possibility of running py_wind from the command line. The principle reason for this was that I wanted to be able to run py_wind from scripts. The usage statement now reads py_wind [-h] -s [rootname]. -h gives a short message and then quits. -s causes the "standard" output files to be produced after which the routine quites. Providing the rootname simply avoids being asked for it. If py_wind is invoked without any thing else, it still performs in the standard way. Fixes pdf.c - I increased the size of input arrays that pdf_gen_from_array could handle from 4000 to 10000 because an error popped up when I tried using my newer disk in disk06 models over the full range. I also improved the Error reporting for this. Note that increasing this number does not increase the basic resolution of the pdf used by python. Changed names of the routines that are specific to py wind so they all start with py_wind (py_ion.c --> py_wind_ion.c, py_write.c --> py_wind_write.c) so they are more easily identifiable. Changed Makefile to allow for this Moved wind creation down in python.c so it was not right in the middle of where one is typing in inputs. There is a lot of time currently speant calculating which elements are in the wind. It's unclear this is needed, but it is even more clear that it annoying to have to wait 3 or 4 minutes to type in the rest of the inputs. Move reading of non-standard disk models into its own routine at the botton of python.c. The goal is that the main routine should be as clean as possible. It's nasty enough with all of the reading of inputs.
Precursor - python_68b Changes Logging - kpar -Reduced the number of times the same error is recorded in the diag file to 100, and provided a capabiility to control this Log_print_max. Logging
- python - Continued modifying the level of error reporting, that is changing various errors from Error to Error_silent. Format of spectrum files - spectra.c, kpar - Added code so that there ae comments in the .spec files that contain all of the input information. The .spec file now also contains a comment that indicates when the file was created. Currently one usually needs to keep copies of the .pf files with the .spec files to understand a spectrum; this is intended to allow one just to keep the .spec files. gradv - In debugging the "7 angles" problem - one of the tools I was using noted that dvds_ave had a conditional jump that was operating on an undefined variable. It was not obvious that this had any practical effect, but I fixed the error. It would be sensible at some point to figure out whether the conditional was needed at all. spectra.c - Fixed a problem that had developed in writing out spectra with more than 7 angles. The problem was due to a header that was being writting into a char string of fixed length. As the number of angles increased, the char string was overrrun. The fix should allow (essentially) an arbitrary number of of angle to be extracted at the same time. In the proces, NSPEC was removed from python.h and put in python.c. It is now used in not other routine in python. Volume calculation - Changes to the way in which volumes are calculated have been made to make the calculations for spherical polar and cylindrical coordinates more nearly the same. The new method uses a brute force calcuation with 100 x 100 resolution to numerically integrated the volume in each cell that is partially in the wind. Before doing this though, it performs a "robust" check to find out if the cell is completely out of the wind or completly in the wind. This saves computing time since the 1000x1000 volume integrations were taking half the total time to run the program in short diagnostic runs. Backgrond: Originally, we had used a 100 x 100 resolution numerical integration for the cylindrical volume. At some point, Stuart upped this to 1000 x 1000 for the cylindrical grid, the one we normally use. His motivation was likely to deal with the problme of a photon getting into a cell where the apparent volume was zero but which really was in the wind. This can happen if the volume is not calculated on a fine enough grid. The problem is recorrded as an error and if one runs a very long job the numbers of errors can be so large that the program stops itself because it thinks something is seriously wrong. The same problem affected the spherical polar coordiante system, as ksl found out when he tried to generate long models in spherical polar coordaintes The simplest solution to the program "falling over" was to cause the error message to print out less often. This is included in version 68c. The error message now only prints out every 100x a photon gets "stucK' in a cell with zerio apperent volume in the wind. This does not however deal with the performance problem. What the program does now is to assume that if all four corners of a 2d grid cell are in the wind then all of the cell is in the wind. If this is not the case, it calculates whether any part of any of the 4 boundary lines are in the wind. If the answer to this is yes, then it does the volume integration. If not, it concludes the volume integral would turn out to be zero. (Note - It is not enough just to check the 4 corners because at the outer edge of the wiind can intersect the cell without necessarily intersectiong one of the corners.) Scattering and absorption - The plasma ptr contains space to record scatters by ion in the wind, and absorption by ion in the wind (for one line of sight). This had been added in python_68a and b, as diagnostics to try to gain a qqualliatitve understanding of where things were happening. Neither of these affect the spectra. I had noted this needed testing, and it definitely had some problems I've modified the scttering routine to record the energy of the photon bundle when it scatters. I've fixed at least one error in the absorption. It still needs further testing, but is more correct than it was. It is important to rember that the quanties recorded are not normalized for the volume of the cell.
Precursor - python_68c Changes Macro Atom variables should now all be stored in 1D structures and references from there - reduces memory requirements Source files replaced here by SAS (10 June) since py_wind wasn't working properly (owing to change above). Seems ok now (at least it compiles) freq_min changed to correspond to 1.2 microns (rather than 2.0) - better for the AGN
Precursor - python_68d Changes Simply makes modifications that were required for portability to 64bit linux platform. These all have to do with vfprintf. The files that were changed are mostly in the kpar routines but signal.c was also affected. Note that there may be issues when if one tries to run py_wind on a wind_save file that has been created with a different architecture. This has not yet been fully explored. Python_68f
- ksl - z.python_68f.091109.tar.gz Precursor - python_68d Changes The primary purpose of this version was to reduce the size of the windsave file which for a 30x30 grid and a particular set of macro atoms was 500 Mbytes. The new version reduces the size of the same windsave file to 17Mbytes. Note that the so-called CoolStruc ? has been eliminated and those variables are now allocated directly from MacroMain ? . On restarts, the freebound probabilities for macro atoms are now recalibrated. Minor changes to other routines have been made mostly to eliminate very old comments and/or deleted code Note - Be sure to dwonlaod the new version of kpar in Python_68e as well.
Precursor - python_68f Changes None in code lines, hopefully: this is just a cleaned-up version of macroatom.c and estimators.c - mostly deleting old comments In going through these routines, some important points about the current macro atom treatment came to mind and so I've created a new page which contains macro atom notes. matomnotes
Precursor - python_68g Changes bands.c - lines to allow the user to redfine the upper and lower limits for mode 4. python.c - changes so if you change the banding in bands.c, the new upper and lower limits are updated correctly. This was done to allow regression testing pywind_sub.c - changes to write out lots more interesting wind data - again - done for regression testing.
Precursor python_68g Changes One simple change in saha.c, line 435. Equation did have same partition function top and bottom. Now correct.
Precursor python_68h Changes - This is a major revision to the code, including the ability to define a power law source in the location of the central star, a new ionization mode using the sim factor, a new wind mode to generate a thin shell, and also associated changes to balance. Several additions to the structures in python.h New spectype (power law) new system_type (AGN - just a disk and a power law source) additions to geo structure for agn power law and luminosity, distance to AGN (for balance), sim weight and alpha for sim code additions to allow for a thin shell test wind. Additions to allow for the creation and writing out of spectrum files in logarithmic units atomic.h density_min parameter changed to 1e-100 - this is to avoid checks which force the sim code to ignore low density ions which may actually be important once we compute correction factors. bands.c New bands to allow arbitrary frequency bands to take in x-rays extract.c Small modification to take account of the new system types. ionization.c Some external variables (sim_numin, sim_numax and sim_meanfreq) set up to communicate with zbrent to allow sim estimateors to be calculated zbrent added to the end of the file - this is a duplicate, and perhaps should be dome more cleverly the function sim_alpha_funch is added to the end of the file. This is the equation 18 in thr 2008 paper and links mean frequency with alpha. It is the equation solved in zbrent. in ionization, mode 4 is added for the initial run thruogh. This is LTE with sim correction, but weight and alpha set to initial values everywhere in the wind. Mode 5 added, this calls oneshot then sim correction. sim_numin and sim_numax are hardwired here to 1.25e15Hz and 1.21e19Hz. This might need correcting in the future. It is in this file that the calculations are made to compute sim_alpha and sim_w. These are used in the sim correction code. In one_shot, slight modification to take account of the new ionization modes. Also some printf lines levels.c Simple modification to take account of new modes. in if is called with mode 3, it does a non lte level calculation with weight=1 and temperature=t_e partition.c Modification to deal with new ionization mode. If called in mode 3, it computes partition functions with w=1 and t=t_e pdf.c Lots of modifications 'changed the way in which pdf_gen_from_function works so it will change the number of points that are used in the array pdf_array in situlations where the number of points that are used in the array where the binning is too coarse. October 2010 KSL photon_gen.c lines added to allow photons to be generated from AGN. AGN photons added to sum of total nmber of photons, and a call is made to the new function photo_gen_agn (located in agn.c) python.c n_ioniz and lum_ioniz are now declared externally so that the total ionizing photon number and luminosity (computed in photon_check) can be reported. modifications to wind_ionization line to allow sim mode to be selected modifications to allow the agn system to be defined, along with spectrum type for agn. Some calculations are done to inform the user of sensible radius for the AGN given the schwartzchild radius A line is here after the call to bands_init to make sure that freqmin and fregmax are updated to take account of any user modified frequency bands. calls to spectrum_summary added to allow logarithmic spectra to be generated and output. *
saha.c A new mode is defined in saha - mode 5. LTE followed by sim correction. In concentrations, a new mode is also defined, mode 3 which is currently identical to mode 1. In order to improve the agreement with SS's FE ionisation fractions in his 2010 paper, density(first) is set to 1e-250 instead of 1. This allows a greater dynamic range of SAHA predicted ions, which then allows huge sim correction factors to give more accurate results. The big parameter which is designed to limit the ratios between adjacent ions in also increased by a factor of 1 million in the line big=big*1e6 There are also a few printf statements to help understand what is going on. spectra.c There are modifications to allow for the new possible sources of radiation to be output in the spectrum files There are also several lines that allow the generation and output of logarithmic spectra. These are selected with a new switch added to the call to spectrum_summary - loglin. If loglin=0, we are producing a linear spectrum, if loglin=1 we are producing a logarithmic spectrum. spherical.c There are modifications to the spherical geometrey file to produce a really thin shell for direct comparison with balance calculations. They allow a shall at 1e16 cm to be produced. This is a work in progress and probably ruins the old spherical geometry. stellar_wind.c Here are the lines to generate the new very thin shell wind. The line equating geo.wind_rmin with geo.rstar is commented out to allow them to differ stuart_sim.c This is an entirely new file containing all the machinery to compute the sim correction factor and apply it. There are several functions sim_driver - this is based on lucy (in saha.c). It cycles of all the elements in he model, calling sim_pl for each sim_pl - this is based on lucy_mazzali (in saha.c) It decides which ions are important (this is where density_min, set in atomic.h becomes important because if it is set too low, ions are ignored which will actually be important once the correction factor is applied). For each important ion it calls xinteg_sim, which carries out the integrations for the sim_facor. This code also decides where in the ground_frac tables we go to for the xi parameter. Once it has the sim factors, it computes the new abundances. The frequencies over which the ionization cross sections are calculated are hardwired into the code here as f1 and f2. xinteg_sim - This is based upon xinteg_fb (in recomb.c). It decides if it is going to use topbase or verner cross sections, then calls qromb with the suitable function. All of the functions for the numerators and denominators of the sim correction factor are also in the file. There is a check to make sure that the denominator (black body times cross section) is not too low, and if it is it makes sure that the numerator is set to a more reasonable number. This is needed because it is possible that the planck function is zero over the whole frequency range integrated over, which gives infinities. This is a big problem, and should probably be fixed in a better way. tb_planck - topbase cross sections multiplied by the planck function verner_planck - verner cross sections multiplied by the planck function tb_pow - topbase cross sections multiplied by a power function verner_pow - topbase cross sections multiplied by a power function sim_alphasolve - this is a little bit of code which solves equation 18 in sim et al 2008 to get the alpha for a cell from the mean frequencies. I think this is now defunct since I decided to use the numerical recipies solver. sim_w
- a code to work out the effective radiative weight in a cell for a power law - it implements equation 19 in sim et al 2009. wind2d.c Two new parameters are computed for each cell of the wind. plasmamain.sim_alpha is set to geo.alpha_agn and sim_w is set to geo.const_agn divided by the surface of a sphere at the centre of the cell, and alos divided by 4pi. As it turns out, we dont actually use these, because the made the decision to set up the ionization fractions as a simple LTE calculation. These lines coupld probably be removed There are also some commented out lines which set up the ionization fractions to SAHA + SIm ? at initialization. wind_updates2d.c There are a few lines here which compute an ionisation parameter in a very simplistic manner, just by working out the luminoisty from 100ev to 50kev, dividing by distance to the centre of the geometry squared, and dividing by the local hydrogen density. There are also lines to output ion fractions, but only if the wind type is the thin spherical shell.
Precursor 69a Changes - There were a couple of 69b versions, but we'll stick a stake in the ground for this one. There are several attempts to fix a few bugs from 69a, and also some modifications to store interesting values to be written out in py_wind. There are also a few mods to py_wind, but only extra options to write out the various new values. The thin shell wind is tidied up, and also the option for a star in the AGN geometry is introduced which means that 69b may have problems with input files meant for 69a. Listed below are the main changes over 69a atomic.h - definition of pi increased number of decimal places. Rounding errors were causing my very thin shell wind to fail, this fixed that. ionization.c - added a check where sim alpha and sim_w are calculated as temporary values, then sane checked. If they are crazy, than the old values for that cell are used. This was to deal with problems were infinite sim_w values were causing he qromb integrations to calculate the sim factor to hang forever. The problem comes when sim estimators are computed in cells with very few photons, or where the photons are definitely not from a power law. This needs to be done better. There is also an improved estimate of the ionisation parameter. Now, the luminosity is computed using the actual sim alpha and sim_w parameters. the major change is in calc_te where instead of using a small temperature range, we allow the solver to search between 1K and 10MK. This was because in some predictions we found local minima trapping the solver. Discussions were had about gridding the temperature space and looking for where the solution was before solving in that new interval. We decided this was exactly the same as just searching in a very wide range. Note that the new temperature is still only allowed to vary from the old one by up to 30%. This eradicated some problems, but will doubtless introduce others. Caution required. knigge.c modified the line which sets geo.xlog scale and geo.zlong scale. They used to be set to rstar, and 1e8 respectively. This was causing problems when using big geometries. They are now both set to rstar/10.0 python.c put an option to have a star in the AGN - this allows BB and PL to come from the centre. This was to allow comparisons with cloudy in a thin shell geometry. put in a new wind type 9 - thin shell wind. The idea is to allow the original stellar wind to still work, whilst also allowing the thin shell which is easy to compare with balance and cloudy. In this geometry dfudge is set to the thickness of the cell/1000, to stop ohotons missing the shell entirely! in photon_checks, freqmin is changed to 0.4 of freqmin. This was because photons scatting in the base of the wind were frequencly getting redshifted out of the frequency bounds and the code was falling over. We probably need a more intelligent way of dealing with this. python.h A few new counters added into the plasma structure. One to count up where the photons come from, one to count total number of photon passages thruogh the cell, and one as the IP of the cell as defined in sim etal 2010. ionization.c Some lines added to populate the new counters of where photons in the cell have come from. resonate.c loads of lines to track photons. These will probably end up being temporary. There was one photon in particular I wanted to track. saha.c updated the check to limit the difference between adjacent ions. Now it only resets b to big if the hydrogen density is less than 1e5. shell_wind.c new file containing the routines to produce a thin shell wind. It is all based on stellar_wind.c. There are several new functions get_shell_wind_params - does what it says! shell_velocity - using the same machinery as spherical_wind, computes the velocity shell_rho - using the same machinery as in spherical wind, computes the density. spherical.c put back spherical make grid to its original form so the normal stellar wind will work again added a new function shell_make_grid, based of spherical_make_grid but designed to make a thin shell - a geometry to help comparisons with cloudy. stellar_wind.c put back the correspondance between geo.wind_rmin and geo.rstar so the stellar wind geometry works the same way it used to. stuart_sim.c changed the way the sim_weight is communitcated to allow more similarity with balance. Balance was not calculating weight in the same way, it does now. changed the hardwired f1 and f2 to be closer to the actual range of frequencies for which there are cross sectional data. Now f1=1.23e15, and f2=1.21e19. There really should be some way of communicating these around, since if they arent the same values as given in bands init, you could get problems the density of the first ion in each element is now set to 1e-200, this gives more headroom for elements with lots of ions. The was motivated by comparisons with cloudy and stuarts 2010 paper where the upper ions of iron were not correct. trans_phot.c lots of printf statements added to track some photons I was interested in. wind.c Added statements to make calls to shell_velocty and shell_rho when the wind type is 9 (thin shell) wind2d.c lines to call shell_make_grid if we are in wind type 9 lines to output lots of information about the one and only cell in a shell wind if we are in that mode.
precursor 69b2 Changes - the main reason we went to a new version number is that the KWD wind was changed to allow for a new parameter to set the velocity at the base of the wind to be a multiple of the sound speed rather than fixed to be equal to the sound speed. This means that a pf file with a KWD wind from 69b wont work in 69c. Here is a list of the changes. knigge.c line to read in the new parameter - geo.kn_v_zero line to multiply vzero by the new parameter matom.c deleted declaration of rho_test, make had been complaining it was never used, and I like to not have any errors other than the ones I have made! photon2d.c added a couple of counters to count up electron scatters vs resonant scatters in a cell. This populates two new elements in the xplasma structure nscat_es and nscat_res. There is also a change to py_wind to allow them to be written out. python.h added the new parameter into the geo.kn structures and also the two new counters mentioned above into the plasma structure resonate.c commented out the declaratiomns of ftemp and beta - not used shell_wind.c removed unused variable dvtemp wind_updates2d.c removed now unused d2_agn parameter. This was used to compute the IP,but we do it better now.
precursor 69c changes - this is a temporary version modified to try and make the non-sim operation agree with 68h. This came about when I tried to run Stuarts input file from the QSO part of the site. It gave totally different results for the temperature distribution. Took a while to make them agree, but the problem appeared to be in a few places. atomic.h reset PI to its original value, no difference, reset density_min to 1e-20. Not much difference, but it clearly does change the densities of ions, and I wanted to try for precise agreement. This can be safely changed back in the next version. ionization.c put the temperature solver back to the original code. This needs testing to see if it really makes a difference. It certainly didn't fix the problem when it was first changed back, but only because there were other more serious problems. It will certainly change the detailed temperature structure. photon1d.c deleted lots of printf lines python.c deleted lots of printf lines resonate.c deleted lots of printf lines including some bracketed by if statements designed to print out track of a particular photon. This changes seemed to be the most important. saha.c Odd one this, in picking thruogh the coe, I noticed that option 3 is incorrect, and concentrations is called with mode3, rather than mode0 is it was in python68. Fixed. This may make the long and knigge figure generated by balance agree once more. Also put back the original big statmenets and put the first ion density to 1. rather than 1e-100. These should not make any difference in the broad scale of things, but it does slightly change the results since we end up with small quantities of other ions. trans_phot.c more printf lines deleted wind2d.c yet more printf lines deleted finally removed the commented out lines which initially set up the wind with a sim correcion. We decided a while back to set it to saha
precursor 69d This is the development version - I'll put up here modifications I make as I'm going on. The aim is that this will be the version with compton scattering, but there are a few other problems I want to fix. pdf.c modificaions made by Knox to fix problems with reweight wind.
precursor - 69d but includes mods to pdf.c made by ksl in summer 2011. This is intended to be the basis for the next set of major modifications which will become python 70
This is what 69f should have been. Use this one as a baseline for python 70 python 70 - nsh, ksl, ss - z.python_70.110805.tar.gz
This version incorporates cooling and piecewise powerlaw ionization. It has not been tested extensively at this point.
precursor - python_70 This version turns adiabatic heating on. It also has fixes to py_wind to make it work with the piece wize powerlaw ionization. Some clean up and additional commenting done in the process.
precursor - python_70a This version implements dielectronic recombination in the ionization balance calculations but not as a cooling mechanism. There are two new files zeta.c - this takes the routines for computing zeta, the correction to the saha equation for recombinations not returning to the ground state, combines it with a correction for DR with a switchable mode. This is an attempt to reduce reused code. The sim part of the code now calls this rather than calculating zeta internally. It should also be changed in lucy_mazzali, but not yet done. dielectronic.c - this is a repository for all the code that will deal with DR. At the moment there is just one routine which takes the coefficients read in and computes a set of rates for a given temperature. * * also required to get this working is a change to Python/data66/atomic/standard39 : standard39 it just adds a line to refer to the DR file: the DR file is clist_K.txt The other main changes in this version are to stuart_sim.c. There was an error in the previous implementaion of the piecewise power law implementation where the only band used was one past the last band! This is fixed, but that in turn showed up problems with doing the frequency check (to see what value of w and alpha should be used) in the integrated function. This made the function discontinuous, and caused major issues with qromb. This check is now outside in xinteg_sim. The code runs. There are also some more comments here and there.
This is my first implementation of the the torus. This version also includes lots of comments. This needs to be reconciled with Nick's version of 70b
precursor
- the two 70b versions - this is a reconciled version. I didn't have too much trouble doing this - for the most part we were working on totally different .c modules. I have run the same model on my 70b, and 70c, and they give the same answers for the ion concentraion of carbon 4, to arbitrary accuracy.
precursor - python-70c This version fixes a basic problem with zero emit needed to incorporate adiabatic cooling into the code. Previously the adiabatic cooling did not change as the a one searched for a temperature that would balance heating and cooling. But adiabatic cooling is proportional to t_e and so it should change as you deal with this. The main changes are in the routine ionization.c Additional minor changes were made to other routine, especially py_wind_subs.c. Various comments were also added to portions of the code. This needs to be integrated into Nick's version of the code. Note that I did not work on the question of whether the compton torus is actually doing what we want, and so problems with this may remain.
precursor - python70d (0917 version) This version fixes the bug that was causing crazy stripes in the data. wind_updates was calling adiabatic_lum with the wrong pointer, and so was getting nonsense results. The previous version fixed the behaviour, but not the root cause. This version also includes an addition to the convergence valuation which now subtracts the adiabatic luminosity from the heat tot before deciding if the heating/cooling is converging. There is also some minor tidying up in py_wind and py_wind_sub
precursor - python_70e This version fixes a major problem that photons were not being detected as they came into the torus region. The main changes are in photon2d.c and torus,c but other change some purely documentation were made in ionization.c, phot_util.c, python.c, radiation.c, saha.c, stuart_sim.c, wind.c. Also, changes were made to py_wind.c and py_wind_subs.c to make it easier to see various variables. I have not attempted to address problems regarding wind emission or anything having to do with ionization though I did begin to look to see what was going on here.
precursor - python_70f This version incorporates a very approximate treatment of dielectric recombination cooling. dielectronic.c function total_dr included to compute dielectronic recombination cooling python.c the bands for the power law ionisation have been changed to exactly match the banding using in photon generation in the agn project. It will probably be best to actually force there two arrays to match if this is what we want emission.c removed compton luminosity from here. It was being added to the quantity total_lum
- which is then used to generate wind photons. This seems to be incorrect. This change is a quick fix - more thought is needed long term ionization.c some changes to the values reported in the convergence - the main change is to add compton cooling and DR cooling to the zero_emit function alongside adiabatic cooling. This means that they contribute to the cooling but are not used to calculate wind luminosity. wind_updates2d.c changes made to how heating and cooling mechanisms are reported to reflect the way that there are now three cooling mechanisms that are not luminosities... resonate.c - removed a load of reporting lines put in by NSH for an interesting photon ages ago.
precursor - python_70g (70h got skipped) emission.c - statement added to allow wind emission from torus to work - probably - not really very well tested. ionization.c
- disk and agn protons turned into floats to allow actual photon numbers rather than packet numbers compton and DR cooling subtracted here from the heating of the cell to avoid them going into lum_tot counters of the three separate convergence criteria zeroed - they get automatically zeroed on the mac but I saw errors when running under linux photon_gen.c
- added the weight of photons being created into the reporting - lets you see wether banding is working OK py_wind_sub - took account of compton and DR cooling not being in the lum_tot put in lines to write out the new IPs ? python.c lum_ioniz and n_ioniz calls now go to geo structure put in a call to a new function wind_ip to calculate a simple ionisation parameter python.h put lum_ioniz and n_ioniz into the geo structure changed the photon counters to floats added ferland_ip and ip to the plasma structure to compute IPs ? radiation.c added lines to compute the IP from the photons added lines to increment photon counters by nphot/energy to give actual numbers rather than packets. resonate.c - took a print line out stuart_sim.c - made it so all the diagnostic files only get generated in diag is set to 1
precursor - python_70i The main changes are as follows: elvis.c, photond2d.c and wind.c - Changes were made to the way in which the elvis model is implemented so the offset and the windcone are properly captured. There should no longer be cells that are said to be in the wind with extremely low densities. py_wind - Changes were made so that the program can be run from the command line using a rdpar file, as well as in the traditional fashion. The goto statement which is quite bad practive has been eliminated. Some new options intended to help with understanding convergence have been added. py_wind_write.c - The output file format has been changed to include lines for whether a cell is in the wind or not, and to give the i j cell number. This goes with a new version of a plotting routine which Knox has written. Improvements have been made to the way 1-d, that is spherical models are print out. ionization.c - Code for the power law model has been moved into its own subroutine power.c. Also stuart_sim.c has been renamed power_sub.c. Ultimately we should rename things like sim_alpha to something that doesnot includes Stuart's name, but his has not been done and is not necessary until we decide where we are going with all of that. Dielectronic recombination has been commented out bands.c - The code which establishes the bands for calculating the power law factors have been moved here from python.c, and some changes have been made to make sure that the bands for which the power law is calculated do not extend beyond the bands in which photons are generated. python.h - the parameters that are associated with setting up the bands for the power law spectrum, e.g nxbands and xfreqs have been moved into the geo structure (so they are accessible from py_wind) Many comments have been added or modified. We need to be more consistent on how we do these. Note that some routines have been processed with indent in order
precursor - python_71 One change: in power_sub.c, the four arrays used to report how the code is producing the sim correction factor (fudge_store, num_store, denom_store and ion_store) are set to have dimension NIONS rather than 300. This is to prevent overflows that were probably happening for ages, but not seen because they were not overflowing into anything important. new atomic directory atomic.tar THIS IS WHAT I HAD BEEN USING BEFORE
- PROBABLY NOT THE BEST IDEA TO HAVE DIFFERENT VERSIONS OF THE ATOMIC DATA - TBD
This is a new version of the atomic directory. It has all the elements that were originally commented out included - no atomic data is added, it was all there already, just commented out. This stops all the
ion not found errors. Also, the dielectronic recombination file is in it and standard70 which includes the DR. The changes are in recomb.data - lines for many ions above Z=14 uncommented elem_ions_ver.py - lines for elements 15, 17, 19, 24, 25 and 28 commented out - low relative abundances and not enough x sections to run properly.
precursor - python_71a The main changes are as follows python.c - Modification to make sure the dfudge parameter is set correctly with the new shell wind description. There is still a longer term issue about wether this could be done better and more generally shell_wind.c - various modifications made so that the shell wind uses stellar wind routines wherever possible to reduce the amount of duplicated code. spherical.c - slight changes to log some data rather than printf it stellar_wind.c - removed references to shell code that had now been removed. wind.c - changed calls that used to go to shell wind routines to call stellar wind routines.
precursor - python_71b This is very much a work in progress, but represents the first version of the code to contain a multiple temperature saha equation approach to finding ionisation state. The idea is you pick a good temperature to calculate LTE abundances at - i.e. one that is guaranteed to give you abundances in each of two adjacent states, then you apply corrections to take account of the fact you are not in LTE. This is simply the general case of the corrections we have been doing all along. This version does not work properly, and is put here to make sure we all have a common version to debug The main changes are as follows ionization.c - added support for two new ionisation modes 6 - correct for dilute blackbody (strictly redundant since LM should do exactly this, but in at the moment for comparisons) and mode 7 - correct for a broken power law. partition.c - added a new function partition_functions_2 which calculates the partition functions for a pair of ions at a given temperature power.c - added support for the new mode 7 - it just calls the new code then oneshot. python.c - support for the new modes at input saha.c - support for the new modes zeta.c - changed the zeta code to do a bit more in the routine. It now also works out where in the ground state table you need to be. It is currently only called by the new code. There is also an entirely new file - variable_temperature.c that contains all the rest of the new code. There is also also a file test_saha.c - very rough and ready that lets one explore the saha abundances etc for input parameters. THere ? is support in the makefile to allow make test_saha to build it.
precursor python_71c (71d's were various test builds) This version seems stable, and the blackbody variable temperature mode (6) agrees with the lucy mazzali mode (3) although it is much slower due to many integrations. The power law mode still needs more testing. The main changes are atomic-h - a new variable in the ion structure called topbase_ground - the ground state level for the ion get_atomicdata.c - some new lines to work out which level is the ground state, and assign it correctly to topbase_ground. variable_temperature.c - several changes, all commented to make it work better wind_updates2d.c - minor changes to write out some more details.
precursor python_71e - 72a's were lots of test versions. I'm posting this version because I'm running some test cases on Iridis using it, and I want to make sure it remains a stable version. It will be changed almost immediately into 72b2. The main changes are: agn.c
- a new subroutine emittance_bpow - it produces photons from a broken power law - this was implemented to allow python to have precisely the same illuminating spectrum as the cloudy command
table atomic.h
- added a new constant - planks constant in Rydbergs - we are now using cloudy lots, and its default energy uint is rydbergs. bands.c
- a new mode - mode 5 has been included which attempts to ensure band of the spectrum estimators are alignedd with the locations of the broken power law breaks. compton.c - implemented the induced compton scattering photon_gen.c - some changes to support the broken power law mode power.c - a few changes to what is written out - includes energies with band limits, and tells you what band number you are looking at python.h - some new elements in the plasma structure to hole induced compton heating radiation.c - some lines to zero induced compton heating, and write it out test_saha.c lots of changes, but this is a test code...
precursor python_72b This version contains the experimental code implementing the cardona partition functions and also tracking of photons passing through a given cell and contributing to its spectrum The main changes are: atomic.h - a new structure cardon_partition which contains the parameters to calculate the partition functions. There is also an extra member of the nion structure (nxcpart)which points to the correct cardona data. There is also a flag in the ion structure (cpartflag) which says wether or not there are cardona partition functions for this ion. bands.c - the bands for the photon tracking are set up here for full runs. They need to be changed to agree with the table command in cloudy! diag.c - lines to check for a file "diag_cells.dat" if we are in diagnostics mode. If the file exists, read in a list of cells for which we are going to write out detailed photon stats. get_atomicdata.c - lines to read in cardona partition functions. The pointer to this type of data is CPART partition.c - two new functions, cardona_part_func and cardona_part_func_2 which calculate the partition functions for the given cell (first case) and a pair of ions (second case - for variable temperature). At the moment, this function is separate from the normal partition functions. If we decide it works. it would make sense to incorporate it into the normal partition functions function, choosing this is data is available, or defaulting to the weighted BB form if not. At the moment, if you call cardona_part_func and have no data for a given ion - it simply uses the ground state. python.h
- a new file pointer (pstatptr) to hold photon data, a flag (cell_phot_stats) to say wether we are logging photons, an array (ncell_stats[NCSTAT] ? ) which holds the cells we are examining and ncstat - the number of cells we are looking at, up to a maximum of 10. radiation.c - lines to write out photon stats
precursor python_72c There was a lot of frenzied activity in the early summer of 2012, this is a stable (ish) version. Balance and thin shell python works, but there is a definite bug in python, which is causing some cause for concern... The main changes are: atomic.h - a new WIEN constant to use to work out peak frequencies of BB distributions, data structures to hold all the new atomic data balance.c
- a little tidy up - making sure the ionization mode is communicated to cycle, even if you want to do LM. A few changes to take account of the renaming of the PL parameters, balance_abso - something done to a cool to bands_init - I think KSL did this balance_gen.c - fixed some lines writing out data to take account of new parameters. balance_sub.c - new call to bands_init, lines to zero parameters stored for PL bands, and also lines to correctly compute J for using in PL. geo_tmax set up and popluated. Some renaming of PL parameters from sim_alpha to pl_alpha, call to total emission changed to take account of the possibility that we now have multiple bands, bb.c - a new little subroutine (check_fmax) added to check that we are going to get a reasonable result from integrating a blackbody. bands.c
- a new mode - mode 6 which tries to discretise the emission bands to properly model a blackbody wien tail, and some new bands for the PL estimators. compton.c - induced compton changed to take account of the possibility of an exponential model for J dielectronic.c - Lines put in to use Badnell type data go generate DR coefficients. get_atomicdata.c - lots of lines to read in new data files ionization.c
- small change - for the PL mode, it now calls a subroutine called spectral_estimators to work out the model for the photons in the cell, before calling oneshot. This means this code looks just like the older stuff. partition.c - cardona stuff removed - it just made our life difficult. power_sub.c - this is really defunct now, but I've changed all the names to let it compite. python.h - lots of new data structures to hold the extra estimators and the exponential models. radiation.c - lines to deal with induced compton. recomb.c
- two new functions - bad_gs_rr which calculates a GS recombination rate from badnell data, total_rrate which calculates a total recombination rate from data, milne_gs_rr calculates a recombination rate from PI data using the milne relation saha.c - the calculation of zeta has been moved out into zeta.c, so the code has been changed to reflect this and ensure there is only once place where zeta is calculated. variable_temperature.c
- many changes - some to try and speed up the execution by only doing integrals when necessary, some to allow for the use of an exponential model wind2d.c - changes to deal with some new parameters than need zeroing wind_updates2d.c - changes to keep allow new estimators to be updated zeta.c - changes to subsume parts of saha into a all purpose calculation for zeta.