-
Notifications
You must be signed in to change notification settings - Fork 24
Python Versions post 74a
precursor - python_73e
This is intended to be the stable version which is to be used for generating data for the 2012 paper. The main changes are:
- atomic.h - A structure gaunt_total put in to hold Sutherlands gaunt factors
- bands.c - the usual changes here, since the power law bands are still hardcoded. There are also new modes to try and match the PL bands.
- bb.c - emittance_bb had been changed in 73e to integrate the bb function directly, rather than use tabulated data. This was causing crashes, so changed back in this version.
- emission.c - several changes put in a new counter for lum_adiabatic - there were problems with adiabatic cooling that were not picked up bacause it was not being reported code put into total_ff and ff to use the sutheralnd gaunt factor data a new routine gaunt_ff written to compute the gaunt factor for free free from sutherlands data - it interpolates on gsquared.
- get_atomicdata.c - lines to read in gaunt factor *levels.c - a new mode to but all levels into ground state - this is an improvement for PL dominated cases but we should really do better
- lines.c - some lines added, and then commented out to implement the approximate gaunt factor to line emission as in hazy 2.This is under development
- partition.c - made it possible to call partition_functions_2 with a weight, this is to allow more flexibility. For the PL_case, we cann with w=0 to force everything into the ground state
- python.c - added ionization options into the question line - set the spectype for the power law to SPECTYPE_POW, rather than defaulting to models, set the innermost stable orbint to 6Rg insead of 12Rg
- python.h - added lum_adiabatic into the geo array to store the total adiabatic cooling of the wind, and also kappa_ff_factor into the plasma structure to calculate the gaunt factor for free free heating, mean_ds also put in to see the mean disatnce travlled by a photon packet in a cell. This will allow one to see if ta cell is effectively optically thin...
- radiation.c - kappa_ff changed to take account of a gaunt factor. There is also a new subroutine put in to calculate the kappa_ff_factor.
Precursor is python_74a This version
- Fixes the problem of too many photons out of the allowed intervals in spectrum_create
- Changes the way bb photons are create when they are very far from the peak of the spectrum to reduce the possibility of NaN being produced
- Various updates to comments
Precursor is python_74a_ksl Changes this version
- python.c - changed call to pop_kappa_ff_array (); so it only occurs if there is data to allow it to work!
- emission.c - changed ff and total_free to allow proper operation if gaunt factor data has not been read in
- radiation.c - changed kappa_ff to allow proper operation if no gaunt factors.
- variable_temperature.c - changed code so density is computed in a copy of the actual array, and changes to the plasma structure only made on proper completion. If the loop searching for n_e fails, then the old densities are retained.
- Precursor is python_74b
- Changes this version
- All sane checks in all files now have an error message associtated with them that reports SUBROUTINE:sane_check
- A lot of files have been modified, but those without any errors associated with sane checks were variable_temperature checks on densities
- thierry.c - few sane checks had errors - but I doubt this file is called very much - seems experimental
- vector.c - there was one sane check without an error, for calculating the length of a vector
- saha.c - checks on densities - this was the original pattern for the vriable_temperatures code, hence the copied lack of errors!
python_74b2 - nsh DO NOT USE - THIS VERSION CONTAINS A SERIOUS BUG WHICH CAUSES SMALL MODELS LIVE CVS TO FAIL...
Precursor is python_74b1 changes this version
- python.c - dfudge now set to 1e5cm or rmax/1e10, whichever is larger
- python.h - two new parameters - MAX_DS_ERR - global to say home many tiny steps a photon can make, and P_DS_ERR added as an option for the photon status to say if it has been thrown away. Also a global variable small_ds_count, the tally of tiny steps for a current photon.
- photon2d.c - Modified translate_in_wind to check if a photon is going to make a step smaller than DFUDGE*1.1 - i.e. its computed distance to the wind is only 10% of the pushthruogh distance. Photon is thrown away with status P_DS_ERR if it makes more than MAX_DS_ERR tiny steps.
- resonate.c - modified the small dv error so it does not report if the photon has already been flagged as having a tiny ds.
- trans_phot.c - zero the small_ds_count tally for the current photon.
Precursor is python_74b1 This papers over the bug NSH121214_2 by increasing DFUDGE to a larger value for large models. changes this version
- python.c - dfudge now set to 1e5cm or rmax/1e10, whichever is larger.
Precursor is python_74b5, a version NSH was using based on 74b4. I am not sure yet if adiabatic cooling bug NSH130322: DIV_V SAME FOR ALL CELLS BUG is fixed here, but will update ASAP. Bugfixes- please consult Python bugs- solved page on the google site: *JM130327: NDIM_MAX BUG- NDIM_MAX is the length of an array allocated in python.h, and was set to 200. if the grid used was greater than 200 in one direction these arrays would have overflows.
- NDIM_MAX increased to 500
- JM130304: Incorrect BB function in some long wavelength runs fixed by setting the 0th element of the integ_planck array to the integral of the BB function up to ALPHAMIN, instead of 0 as it was before
- JM130302: INTEGER TOTAL PHOTON NUMBER BUG fixed by converting to double precision before calling define_phot() Please note- not yet properly regression tested, and needs to be reconciled with NSH's adiabatic cooling fix for Python_75.
Precursor - python_74b5_JM This incorporates files which Nick thought were not in python_74b5, but the only one that was really different is the wind2d.c, which is I believe the adiabatic fix Other small changes are as follows:
- Deleted a number of print statements that Nick had put in for diagnostic purposes. These are cluttering up the printed outputs which were intended to be brief and make it possible for one to use the printed output to see where one was in the routine. If needed, one should use the Log or Log_silent so they will go in the diagnostic. Otherwise ddd is a better approach. changed others that were Log to Log_silent Added error check concerning NDIM_MAX. The program should exit with an error if this a problem. It would be possible to define these arrays dynamically, and that is probably what should be done. In that sense, my fix is a kluge KSL changed JM130302 INTEGER TOTAL PHOTON NUMBER BUG to a long conversion instead of a double precision conversion when calling define_phot().
- JM130411B LOG_SPEC_TOT NOT RESET Bugfix: the log_spec_tot output is now reset at the start of each ionisation cycle as it should be.
- JM also changed the incrementing of geo.pcycles and geo.wcycles to be after the xsignal call, so that the .sig files display the correct printouts - at the moment, cycle 0 is the first cycle (like array notation). Note - This needs regression testing. Also, it probably should be chieked to see if the fixes that have been worked out are all incorproated.
Precursor - python_75 This is mainly improvements to the proga routines, and a couple of other little fixes Changes this version
- bb.c - removed an unused variable x
- proga.c - added some comments, corrected a minor bug so that the values of density etc are read in from the column that represent the centre of a zeus cell,
- Added a little routine (proga_temp) which uses the internal energy to compute the temperature of a cell - very useful as a better initial guess and also for other tests. spectra.c - corrected curly brackets to actually (finally) zero the log spectra
- variable_temperature.c - commented out a line defining a currently unused variable.
- wind.c - added a test to try and avoid the case where some architcetures (iridis) take a very long time to compute if a photon is in the wind when geo.wind_thetamax is equal to pi/2. Now, if this is close to thetamax, (within 1e-6 radians), the photon is assumed to be in the wind, and the test involving tan(thetamax) is not carried out.
- wind2d.c - added code to use the zeus temperature as an initial guess for the wind if we are reading in a proga model
###python_75b Precursor - python_75a
- A very minor release - just to ensure all variables are initialised to stop iridis's stroppy compiler complaining in 03 optimisation.
Precursor - python_75b
- Minor but important bugfix - moved geo.wcycle++ command to before wind_save at end of ionization cycle.
- Another very minor bugfix, changed the lines where the dfudge parameter is reported to actually report it correctly!
Precursor - python_75c Minor bugfix plus a new py_wind option Changes this version
- wind2d.c - removed a stray command setting t_r in the wind to the value read in from the parameter file. This was stopping the command that set the wind temperature to the proga temperature in the relevant wind mode
- py_wind and py_wind_sub - new command H - writes out all heating and cooling mehchanisms to allow plots to be generated showing the dominant mechanisms.
Identical to Python 75d but beautified with gnu indent.
- Precursor is python_75e
- This is a pre-parallelisation version from the June meeting Coding changes:
- Bugfixes
- no. 11 PYWIND MALLOC MATOM BUG: Fixed by removing free statements in gridwind.c
- no. 16 SPHERICAL POLAR RTHETA BUG: Fixed by KSL, see bug report
- changes to rtheta.c to stop negative z problem
- no. 9 WINDSAVE BUG: new variables in geo and palsma structure so correct luminosities written out in pywind
- involved changes to py_wind_sub, wind_updates and python.h
- Changed how watchdog timer prints to screen
- general code cleanup and minimising command line writing
- Updated bands.c to add a new mode in bands_init which allows in a general fashion to set bands logarithmically. This is band mode 8.
- makefile edited to use debug option if compiled with D=1 option (e.g. make D=1 python)
Precursor is Python 76
-
Certain features have been parallelised
- ionization cycles photon propagation
- ionization cycles spectrum
- ionization cycles wind update
-
makefile now uses mpicc
-
certain mpi libraries now used in python.h
-
Files edited:
- Makefile
- python.h
- python.c
- wind_updates.c