multiwavelength / gleam

Galaxy Line Emission & Absorption Modeling
https://github.com/multiwavelength/gleam
BSD 3-Clause "New" or "Revised" License
24 stars 6 forks source link

Error when processing multi files #35

Open Gade-Z opened 1 year ago

Gade-Z commented 1 year ago

Error when processing multi files, but process single file works

(py38_gleam) zijianzhang@fushuqis-iMac formated_Data % gleam --path gleam_Data --spectra .//spec1d.MMT.Hectlow.a.24.fits --config gleamconfig.yaml --plot WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] Usage: gleam [OPTIONS] Try 'gleam --help' for help.

Error: Got unexpected extra argument (./gleam_Data/spec1d.MMT.Hectlow.a.243.fits) (py38_gleam) zijianzhang@fushuqis-iMac formated_Data % gleam --path gleam_Data --spectra ./**/spec1d.MMT.Hectlow.a.243.fits --config gleamconfig.yaml --plot WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity] Now working in ./gleam_Data on MMT in Hectlow + a on source 243 at z=0.322.

Victor-Savu commented 1 year ago

Hi Grade-Z! Does the error come up on the example data set included in this repository? It would be super helpful if you could reproduce it with that data set, so that we can get the same error on our machines.

Here is what I did:

  1. I prepared the data folder:
    curl -L -O https://github.com/multiwavelength/gleam/raw/main/example.tar.gz
    tar xf example.tar.gz
    cd example
  2. In that data folder, I ran gleam twice, with command similar to the ones you ran on your data. a. The first one didn't produce any output (because the spectra pattern didn't match any files due to the double slash // in the path):
      gleam --path . --spectra .//spec1d.A773.WHT_R316R.Q1_EXT1.008.fits --config gleamconfig.yaml

    b. The second one produced the linefits output file we expected:

      gleam --path . --spectra ./**/spec1d.A773.WHT_R316R.Q1_EXT1.008.fits --config gleamconfig.yaml

    output:

      Now working in ./A773 on A773 in WHT_R316R + Q1_EXT1 on source 8 at z=0.263.
      Warning: non-constant dispersion
      Warning: non-constant dispersion
      Warning: non-constant dispersion
      Warning: non-constant dispersion
      Warning: non-constant dispersion
      Warning: non-constant dispersion