Closed stormnick closed 1 year ago
bug fixes, can now run the code
fixed bug with output saving
improved chi squared calculation speed for lbl
fixed bug with lbl not quick mode not fitting
file to plot results from quick lbl analysis
Update README.md
added asyncio to generation of grids for lbl quick
added asyncio to generation of grids for lbl quick, fix
fixed bug if fitting only 1 star
rollback to pre asyncio version
fixed bug with fitting of only 1 spectra and fitting non-Fe
made convolving with macroturbulence a bit faster
added some todo lines
fixed bug with non-fe fitting
added documentation
added documentation and todos
added todos and a few utility files
fixed bug where element is not printed in lbl for output
first push of the several elements fitting algorithm
fixed bug where iron cannot be found in list (list->np.ndarray)
fixed bug with output of several elements
removed extra +met, not needed?
fixed update with not loading metallicity when fitting other elements
bug fix no metal load for only 1 spectra fit
fixed of bugs of loading from input
fixed if only 1 segment
fixed bug with fit of only 1 segment
fixed runaway argument
creates the array with the param guess automatically now
fixed bug with only 1 segment input (again)
fixed bug with only 1 segment input (again x2): trimming now
fixed bug with fitting fe
added printing of datetime when started and finished fit
fixed param guess for microturb part
delete spectra object at the end (maybe help with memory?)
removed not needed config lines (nelements, ndimen)
fixed bug with nlte location file loading when no Fe fit
fixed bug with nlte location file loading when no Fe fit (again). and new loading of fitlist
fixed bug with nlte loading again
fixed bug with nlte loading again x2
fixed bug with nlte loading when no nlte file exists
updated the unittest to not create convolved spectra
Added ability to load config directly from python setup
removed duplicate temp dir removal
added ability to input vmacro and guess for elements
fixed when non-macro_input
fixed bug with macro turbulence value not working
fixed bug with macro turbulence value not working #2
conversion of macro to float when loading it
added bounds to the fitting and fix bug of not fitting micro
removed unnecessary print and restricted doppler shift bound more
updated creation of initial guess from random to linspace
fixed bug where lbl quick could not be fitted
fixed problem where parameters were linearly dependent because of initial guess
faster init of TS and new lbl version: decouple macro/DP & abund fitting: x3+ times faster fit
added random number to naming system and decreased tolerance for lbl v2
lbl quick now without windows flag and removed extra prints
added a bit more documentation
fixed bug with v2 fitting and added failsafe when not enough atmospheres
fixed bug with annotations for lower python versions
updated requirements.txt to include scipy high enough for bounds
updated fitlist to explain better what to include here
added ability to load 3D models and interpolate whether s or p (need to have all named as p with no mass though)
removed printing of lbl_quick fitted spectra
trying to make it possible to interpolate marcs atmosphere, when vertices not at the same distance
now can interpolate even when models not at equal vertices (teff,logg, metal)
fixed bug where extreme values result in error when finding models for 3D interpolation
added fail safe if NLTE does not contain atmosphere parameters
fixed bug with 3D models interpolation for s models
made trimming about 30 times faster
fixed bug with Hlinedata trimming and cleaning old trimmed files
fixed bug with trimming when linelist is smaller than segment and when doing lbl trimming
renamed binary function name to better represent its purpose
removed interpolation of 3D models when not equal vertices
added support for the lower python versions
added fitting of the Teff
made trimming faster when several segments
fixed bug with not loading abund guesses and added some basic input checks
fixed problem with the teff fitting not using NLTE correctly and better printing
fixed bug where teff could not be fitted
fixed bug where logg<3 spherical 3D models are not fitted
delete marcs_standard_comp, was causing issues with new cloning
can fit several spectra with the same name now
fixed unexpected change and started adding rotation fitting lbl
added rotation fit for lbl and improved structure of guess functions
fixed convert_lte_to_nlte.py for some new atom and linelist versions with edge cases
added ability to input rotation bound/guess in config
added an ability to input a constant abundance of an element that is not fitted
if a spectra does not have input abundance, then it does not crash
fixed trimming for "all" and "lbl_quick" methods
fixed trimming for "all" and "lbl_quick" methods 2
fixed trimming for "all" and "lbl_quick" methods finally
change minimization algorithm to BFGS for the macro and RV. works much better
fixed text when RV guess is outside bounds
updated to new fitting method for all func that call that line
added new version to create synthetic spectra using multiprocessing
fixed bug (barium problem) where last line was not included in trimmed one
added ability to name output_folder with title instead of the date. also prep for MPI run
removed messages if one can't use MPI
fixed scaling of helium according to the metallicity
class TurboSpectrum is made for every line/fit separately + getting marcs models only once
merged TS class into TSFitPy, otherwise doesn't work. several lines in parallel fitting is done
experimental works good now, checks if nlte file exists, debug+exp config
EW calculation WIP
added ew calculation and some bugfixes
fixed bug with doppler shift application
fixed bug when atmosphere fails to generate
added check for the dask package
fixed bug where macro conv is broken for <5AA
fixed bug where macro not fitted
fixed bug with EW calculation
fixed bug with checking for model atom existence
fixed bug where experimental feature doesnt work
fixed bug with saving convolved spectra
fixed crash when reading empty line in config or input_elem does not have spectra name
fixed bug where experimental cannot be turned on with capital
fixed run_wrapper to run with new changes
convoluted spectra now saved +/- 1 AA
fixed error message and 1 more small test
removed old code
small code refactoring
refactored minimize to be one function to call
trying cma minimization
trying with optuna instead
Update tsfitpy_input_configuration.txt
updated according to latest changes + Extra comments
fixing optuna, calling function with args
fixed 1D minimization optuna
fixed extraction of the best parameters
removed logging info from optuna
removed logging info from optuna attempt2
trying medianpruner and less logging
added calculate nlte_correction line
fixed bug with title not input
fixed import statement
fixed trimming
fixed bug with join of path
fixed atmo parameters being str not float
making class just to store eveyrhting
fixed passing of lines
debug message in TS class
trying to debug
fix load of linelist
fix bounds minimize
fixed calling of minimize function
fixing ew calculation
debug message
fixing bug for minimize
added tolerance and higher error
testing if nlte works
trying again
trying with extra tolerances
back to nelder mead
trying different guess for the algorithm
config now says which element to fit
added saving the output
allow cutting several lines
optimised import of cutting linelist
fixed trimming taking extra lines from lower wavelength
fixed printing + better guess
changed guess back to good one
moved temp_dir into global temp dir
removed unnecessary import
added extra output comments + columns
more comments when printing
more comments when finished fitting
ew is calculated on a bigger scale now
removed unnecessary loading of flux
testing different algorithm
ok nelder-mead is the only option
added comment about abundance precision error
added higher precision to abundances
trying a bit worse precision
trying 2 decimal again
trying less rounding
now higher precision should work
trying to fix bug with interpolation of higher precision
added basic jupyter notebook for plotting
added pd df of results and their plotting
added extra plots and comments
took out scripts into their own file
changed internal structure to pd for results
added title with fitted results
removed plotted figures
fixed issue when plotting only 1 point
not saving overlapping spectra if closeby linemasks anymore
cleaned the outputs
cleaned the debug stuff
fixed bug when only 1 line in fitlist
decreased the tolerance for line fitting
fixed bug with saving the results
fixed bug when no slash given in path
updated readme: adding more instructions
cleaned up reading of config + trimming in temp dir
updated readme file with installation and usage a bit
micro interpolation fix by Jeff and temp dir clean up crash fix
code refactoring
decreased the tolerance for fitting
Update Readme + default example for Fe fitting
Updated README.md
fixed bug with commented line
fixed crash when no output
fixed crash when no output 2
Update turbospectrum_class_nlte.py
loading of observed spectra only for columns 0 and 1 for plotting
fixed bug where plotting of all spectra would duplicate for multiple lines
added paramater whether to plot title or not
added parameter to save figure
save figure with wavelength center as well
fixed bug with saving
fixed crash when lte didnt generate
fixed bug where correct atmos were not taken
removed unnecessary code/comments and faster LTE creation
removed unnecessary scripts
bug fixes, can now run the code
fixed bug with output saving
improved chi squared calculation speed for lbl
fixed bug with lbl not quick mode not fitting
file to plot results from quick lbl analysis
Update README.md
Update README.md
added asyncio to generation of grids for lbl quick
added asyncio to generation of grids for lbl quick, fix
fixed bug if fitting only 1 star
rollback to pre asyncio version
fixed bug with fitting of only 1 spectra and fitting non-Fe
made convolving with macroturbulence a bit faster
added some todo lines
fixed bug with non-fe fitting
added documentation
added documentation and todos
added todos and a few utility files
fixed bug where element is not printed in lbl for output
first push of the several elements fitting algorithm
fixed bug where iron cannot be found in list (list->np.ndarray)
fixed bug with output of several elements
removed extra +met, not needed?
fixed update with not loading metallicity when fitting other elements
bug fix no metal load for only 1 spectra fit
fixed of bugs of loading from input
fixed if only 1 segment
fixed bug with fit of only 1 segment
fixed runaway argument
fixed runaway argument
creates the array with the param guess automatically now
fixed bug with only 1 segment input (again)
fixed bug with only 1 segment input (again x2): trimming now
fixed bug with fitting fe
added printing of datetime when started and finished fit
fixed param guess for microturb part
delete spectra object at the end (maybe help with memory?)
removed not needed config lines (nelements, ndimen)
fixed bug with nlte location file loading when no Fe fit
fixed bug with nlte location file loading when no Fe fit (again). and new loading of fitlist
fixed bug with nlte loading again
fixed bug with nlte loading again x2
fixed bug with nlte loading when no nlte file exists
updated the unittest to not create convolved spectra
Added ability to load config directly from python setup
removed duplicate temp dir removal
added ability to input vmacro and guess for elements
added ability to input vmacro and guess for elements
fixed when non-macro_input
fixed bug with macro turbulence value not working
fixed bug with macro turbulence value not working #2
conversion of macro to float when loading it
added bounds to the fitting and fix bug of not fitting micro
removed unnecessary print and restricted doppler shift bound more
updated creation of initial guess from random to linspace
updated creation of initial guess from random to linspace
fixed bug where lbl quick could not be fitted
fixed problem where parameters were linearly dependent because of initial guess
faster init of TS and new lbl version: decouple macro/DP & abund fitting: x3+ times faster fit
added random number to naming system and decreased tolerance for lbl v2
lbl quick now without windows flag and removed extra prints
added a bit more documentation
added a bit more documentation
fixed bug with v2 fitting and added failsafe when not enough atmospheres
fixed bug with annotations for lower python versions
updated requirements.txt to include scipy high enough for bounds
updated fitlist to explain better what to include here
added ability to load 3D models and interpolate whether s or p (need to have all named as p with no mass though)
removed printing of lbl_quick fitted spectra
trying to make it possible to interpolate marcs atmosphere, when vertices not at the same distance
now can interpolate even when models not at equal vertices (teff,logg, metal)
fixed bug where extreme values result in error when finding models for 3D interpolation
added fail safe if NLTE does not contain atmosphere parameters
fixed bug with 3D models interpolation for s models
made trimming about 30 times faster
fixed bug with Hlinedata trimming and cleaning old trimmed files
fixed bug with trimming when linelist is smaller than segment and when doing lbl trimming
renamed binary function name to better represent its purpose
removed interpolation of 3D models when not equal vertices
added support for the lower python versions
added fitting of the Teff
made trimming faster when several segments
fixed bug with not loading abund guesses and added some basic input checks
fixed problem with the teff fitting not using NLTE correctly and better printing
fixed bug where teff could not be fitted
fixed bug where logg<3 spherical 3D models are not fitted
delete marcs_standard_comp, was causing issues with new cloning
can fit several spectra with the same name now
fixed unexpected change and started adding rotation fitting lbl
added rotation fit for lbl and improved structure of guess functions
fixed convert_lte_to_nlte.py for some new atom and linelist versions with edge cases
added ability to input rotation bound/guess in config
added an ability to input a constant abundance of an element that is not fitted
if a spectra does not have input abundance, then it does not crash
Update README.md
fixed trimming for "all" and "lbl_quick" methods
fixed trimming for "all" and "lbl_quick" methods 2
fixed trimming for "all" and "lbl_quick" methods finally
change minimization algorithm to BFGS for the macro and RV. works much better
fixed text when RV guess is outside bounds
updated to new fitting method for all func that call that line
added new version to create synthetic spectra using multiprocessing
fixed bug (barium problem) where last line was not included in trimmed one
added ability to name output_folder with title instead of the date. also prep for MPI run
removed messages if one can't use MPI
fixed scaling of helium according to the metallicity
class TurboSpectrum is made for every line/fit separately + getting marcs models only once
merged TS class into TSFitPy, otherwise doesn't work. several lines in parallel fitting is done
experimental works good now, checks if nlte file exists, debug+exp config
EW calculation WIP
added ew calculation and some bugfixes
fixed bug with doppler shift application
fixed bug when atmosphere fails to generate
added check for the dask package
fixed bug where macro conv is broken for <5AA
fixed bug where macro not fitted
fixed bug with EW calculation
fixed bug with checking for model atom existence
fixed bug where experimental feature doesnt work
fixed bug with EW calculation
fixed bug with EW calculation
fixed bug with saving convolved spectra
fixed crash when reading empty line in config or input_elem does not have spectra name
fixed bug where experimental cannot be turned on with capital
fixed run_wrapper to run with new changes
convoluted spectra now saved +/- 1 AA
fixed error message and 1 more small test
removed old code
small code refactoring
refactored minimize to be one function to call
trying cma minimization
trying with optuna instead
Update tsfitpy_input_configuration.txt
updated according to latest changes + Extra comments
Update tsfitpy_input_configuration.txt
fixing optuna, calling function with args
fixed 1D minimization optuna
fixed extraction of the best parameters
removed logging info from optuna
removed logging info from optuna attempt2
trying medianpruner and less logging
added calculate nlte_correction line
fixed bug with title not input
fixed import statement
fixed trimming
fixed bug with join of path
fixed atmo parameters being str not float
making class just to store eveyrhting
fixed passing of lines
debug message in TS class
trying to debug
fix load of linelist
fix bounds minimize
fixed calling of minimize function
fixing ew calculation
debug message
fixing bug for minimize
added tolerance and higher error
testing if nlte works
trying again
trying with extra tolerances
back to nelder mead
trying different guess for the algorithm
config now says which element to fit
added saving the output
allow cutting several lines
fixed trimming
optimised import of cutting linelist
fixed trimming taking extra lines from lower wavelength
fixed printing + better guess
changed guess back to good one
moved temp_dir into global temp dir
removed unnecessary import
added extra output comments + columns
more comments when printing
more comments when finished fitting
ew is calculated on a bigger scale now
removed unnecessary loading of flux
testing different algorithm
ok nelder-mead is the only option
added comment about abundance precision error
added higher precision to abundances
trying a bit worse precision
trying 2 decimal again
trying less rounding
now higher precision should work
trying to fix bug with interpolation of higher precision
added basic jupyter notebook for plotting
added pd df of results and their plotting
added extra plots and comments
took out scripts into their own file
changed internal structure to pd for results
added title with fitted results
removed plotted figures
fixed issue when plotting only 1 point
not saving overlapping spectra if closeby linemasks anymore
cleaned the outputs
cleaned the debug stuff
fixed bug when only 1 line in fitlist
decreased the tolerance for line fitting
fixed bug with saving the results
fixed bug when no slash given in path
updated readme: adding more instructions
cleaned up reading of config + trimming in temp dir
updated readme file with installation and usage a bit
micro interpolation fix by Jeff and temp dir clean up crash fix
code refactoring
decreased the tolerance for fitting
Update Readme + default example for Fe fitting
Updated README.md
fixed bug with commented line
fixed crash when no output
fixed crash when no output 2
Update turbospectrum_class_nlte.py
loading of observed spectra only for columns 0 and 1 for plotting
fixed bug where plotting of all spectra would duplicate for multiple lines
added paramater whether to plot title or not
added parameter to save figure
save figure with wavelength center as well
fixed bug with saving
fixed crash when lte didnt generate
fixed bug where correct atmos were not taken
removed unnecessary code/comments and faster LTE creation
removed unnecessary scripts