TSFitPy-developers / TSFitPy

Turbospectrum Spectral Fitting with Python (TSFitPy)
13 stars 4 forks source link

Help Request: UVES_Sun-1_cleaned_norm.txt fit does not converge #62

Closed sagiph-weizmann closed 8 months ago

sagiph-weizmann commented 8 months ago

Dear Jeffrey.

My name is Sagi Ben-Ami, and I am a faculty member at the Weizmann institute of Science in Israel.

My main focus is on developing astronomical instruments, but at the moment I am also interested in stellar astrophysics, with a focus on Ba stars.

I have downloaded your TSFitPy package, in order to use it to estimate Ba abundances in several spectra, and am trying to run it following the example on github. However, my output, reproduced below, indicates my run is not fitting any line.

Can I kindly ask you to take a look and see if you can identify an error or mistake in the way I run the example ?

(I did notice that the actual output directory name is Jan-04-2024-10-56-22_0.7717720470148655_LTE_Fe_1D and not Jan-04-2024-10-56-22_0.7717720470148655 as in the temp_directory generated, but I assume it is not the issue).

Thanks in advance - the package you are authoring is of great help for the work I am trying to promote, and I will of course give proper credit in any possible future publication.

All the best - and happy new year,

Sagi.


Start of the fitting: Jan-04-2024-10-56-22_0.7717720470148655

IMPORTANT UPDATE: Update 24.05.2023. Currently the assumption is that the third column in the observed spectra is sigma i.e. the error in the observed spectra (sqrt(variance)). If this is not the case, please change the spectra.If none is given, the error will be assumed to be 0.01. This error is taken into account in chisqr calculation

Fitting data at /Users/benamis/tools/TSFitPy/./input_files/observed_spectra/ with resolution 0.0 and rotation 0.0 Temporary directory name: /Users/benamis/tools/TSFitPy/./temp_directory/Jan-04-2024-10-56-22_0.7717720470148655/ Fitting 1 element(s): ['Fe']

Checking inputs

Done doing some basic checks. Consider reading the messages above, if there are any. Can be useful if it crashes.

Jan-04-2024-10-56-22_0.7717720470148655 Trimming down the linelist to only lines within segments for faster fitting Finished trimming linelist /Users/benamis/tools/TSFitPy/./input_files/observed_spectra/UVES_Sun-1_cleaned_norm.txt No error sigma given in 3rd column, setting to 0.01 Fitting UVES_Sun-1_cleaned_norm.txt Teff = 5771.0; logg = 4.44; RV = 0.0 Fitting line at 5415.199 angstroms 5415.199 5414.95 5415.46 5410.95 5419.46 didn't generate spectra or atmosphere [Fe/H]=-0.9019 rv=9999.0000 vmic= 1.0295 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 didn't generate spectra or atmosphere [Fe/H]= 0.2822 rv=9999.0000 vmic= 1.0814 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 didn't generate spectra or atmosphere [Fe/H]=-2.0860 rv=9999.0000 vmic= 1.0057 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 didn't generate spectra or atmosphere [Fe/H]=-0.6059 rv=9999.0000 vmic= 1.0398 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 didn't generate spectra or atmosphere [Fe/H]=-0.9019 rv=9999.0000 vmic= 1.0295 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 Converged: Fe: -0.90 Number of iterations: 2 /Users/benamis/tools/TSFitPy/./temp_directory/Jan-04-2024-10-56-22_0.7717720470148655/UVES_Sun-1_cleaned_norm.txt0/0.09038835929341216/spectrum_00000000.spec not found. Failed spectra generation completely, line is not fitted at all, not saving spectra then Total runtime was 0.09 minutes. Fitting line at 5441.339 angstroms 5441.339 5441.12 5441.58 5437.12 5445.58 didn't generate spectra or atmosphere [Fe/H]=-0.9867 rv=9999.0000 vmic= 1.0269 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 didn't generate spectra or atmosphere [Fe/H]= 0.3099 rv=9999.0000 vmic= 1.0829 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 didn't generate spectra or atmosphere [Fe/H]=-2.2833 rv=9999.0000 vmic= 1.0044 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 didn't generate spectra or atmosphere [Fe/H]=-0.6626 rv=9999.0000 vmic= 1.0377 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 didn't generate spectra or atmosphere [Fe/H]=-0.9867 rv=9999.0000 vmic= 1.0269 vmac=9999.0000 rotation=9999.0000 chisqr=999999.99990000 Converged: Fe: -0.99 Number of iterations: 2 /Users/benamis/tools/TSFitPy/./temp_directory/Jan-04-2024-10-56-22_0.7717720470148655/UVES_Sun-1_cleaned_norm.txt0/0.0515059063065455/spectrum_00000000.spec not found. Failed spectra generation completely, line is not fitted at all, not saving spectra then Total runtime was 0.08 minutes. TSFitPy had normal termination Fitting completed End of the fitting: Jan-04-2024-10-56-40

JGerbs13 commented 8 months ago

Hi Sagi,

It appears that Turbospectrum is not running correctly on your machine. Have you downloaded the most recent version of Turbospectrum and checked that it runs outside of TSFitPy?

Cheers, Jeff