rwesson / ALFA

Automated Line Fitting Algorithm
http://www.nebulousresearch.org/codes/alfa/
GNU General Public License v3.0
12 stars 6 forks source link

Fortran runtime error: Bad value during integer read #30

Closed rhysaph closed 4 months ago

rhysaph commented 4 months ago

Hi Roger, Using your excellent ALFA software and hit a snag, see below. Thanks, Rhys

Running ALFA on a file of wavelength-flux pairs and get the following output and error.

rahm@mme-desktop:ALFA: alfa jx5_spectrum_red.txt ALFA, the Automated Line Fitting Algorithm version v2.2-20-g9aa9b90

23:55:34 : starting code command line: alfa jx5_spectrum_red.txt ALFA is running with the following settings: file: jx5_spectrum_red.txt normalisation: using measured value of Hb continuum fitting: enabled continuum window: 101 spectrum fitted if max value > 0.00000000
Angstroms per wavelength unit: 1.00000000
multiple spectra: fitted individually velocity guess: 0.00000000
resolution guess: 0.00000000
first pass velocity tolerance: 179.875488
second pass velocity tolerance: 59.9584923
first pass resolution tolerance: 0.00000000
second pass resolution tolerance: 500.000000
sky line fitting: disabled strong line catalogue:
deep line catalogue:
number of generations: 500 population size: 30 pressure factor: 0.300000012
output directory: ./ output format: fits

        reading in file jx5_spectrum_red.txt:
        filename does not contain .fit or .FIT, so assuming plain text format
          number of data points:         1804
          wavelength range:    4842.00000       10172.0000    

        optical strong line catalogue selected
        optical deep line catalogue selected
        reading in line catalogues

At line 518 of file source/readfiles.f90 (unit = 199, file = '/usr/share/alfa/optical_deep.cat') Fortran runtime error: Bad value during integer read

Spectrum attached (I think). jx5_spectrum_red.txt

jx5_spectrum_red.txt

rhysaph commented 4 months ago

I should add that this was on Ubuntu 22.04.

rwesson commented 4 months ago

Hi, thanks for the bug report! This was due to an incorrect format statement which affected spectra with wavelengths both below and above 10,000A. I've just pushed fixed source code and will update the packaged versions of the code soon. I'll close the issue but if the problem persists, please reopen it.