Coder Social home page Coder Social logo

Comments (4)

karllark avatar karllark commented on June 3, 2024

With the latest version, I get a different error.

(abscal) kgordon@beast GD153]$ wfc3_coadd -fvdt dirtemp_grism.log
usage: wfc3_coadd [-h] [--paths PATHS] [-i IN_FILE] [-o OUT_FILE]
                  [-s SPEC_DIR] [-c] [-f] [-v] [-d] [--prefix PREFIX] [-p]
                  [-b BKG_FLAT_ORDER]
                  table
wfc3_coadd: error: argument -d/--double: ignored explicit argument 't'

from abscal.

karllark avatar karllark commented on June 3, 2024

When running wfc3_coadd --help there is no indication that t is a valid command line switch. Removing it results in the following error.

(abscal) kgordon@beast GD153]$ wfc3_coadd -fvd dirtemp_grism.log
{'paths': ['/user/kgordon/Hubble/ABSCAL/WFC3/GD153'], 'in_file': None, 'out_file': 'dirirstare.log', 'spec_dir': 'spec', 'compat': False, 'force': True, 'verbose': True, 'table': 'dirtemp_grism.log', 'double': True, 'prefix': None, 'plots': False, 'bkg_flat_order': 'flat_first'}
wfc3: grism: coadd: Starting WFC3 coadd for GRISM data.
wfc3: grism: coadd: Input table is:
   root   obset  ... planetary_nebula                            notes                           
--------- ------ ... ---------------- -----------------------------------------------------------
idvj01p4q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01p5q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01p7q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01p8q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01paq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01pbq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01phq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01piq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01pkq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01plq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01poq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01ppq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
wfc3: grism: coadd: Found 1 unique obsets: ['idvj01']
Traceback (most recent call last):
  File "/user/kgordon/anaconda3/envs/abscal/bin/wfc3_coadd", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/user/kgordon/STScI/AbsFlux/ABSCAL/abscal/commands/wfc3_coadd", line 25, in <module>
    main()
  File "/user/kgordon/STScI/AbsFlux/ABSCAL/abscal/commands/wfc3_coadd", line 21, in main
    do_coadd(**kwargs)
  File "/user/kgordon/STScI/AbsFlux/ABSCAL/abscal/wfc3/reduce_grism_coadd.py", line 889, in main
    output_table = coadd(input_table, **vars(parsed), **kwargs)
  File "/user/kgordon/STScI/AbsFlux/ABSCAL/abscal/wfc3/reduce_grism_coadd.py", line 168, in coadd
    if os.path.isfile(os.path.join(out_dir, filter_table[0]['coadded'])):
  File "/user/kgordon/anaconda3/envs/abscal/lib/python3.10/posixpath.py", line 90, in join
    genericpath._check_arg_types('join', a, *p)
  File "/user/kgordon/anaconda3/envs/abscal/lib/python3.10/genericpath.py", line 152, in _check_arg_types
    raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'MaskedConstant'

from abscal.

karllark avatar karllark commented on June 3, 2024

Getting further with the latest update.

(abscal) kgordon@beast GD153]$ wfc3_coadd -fvd dirtemp_grism.log
{'paths': ['/user/kgordon/Hubble/ABSCAL/WFC3/GD153'], 'in_file': None, 'out_file': 'dirirstare.log', 'spec_dir': 'spec', 'compat': False, 'force': True, 'verbose': True, 'table': 'dirtemp_grism.log', 'double': True, 'prefix': None, 'plots': False, 'bkg_flat_order': 'flat_first'}
wfc3: grism: coadd: Starting WFC3 coadd for GRISM data.
wfc3: grism: coadd: Input table is:
   root   obset  ... planetary_nebula                            notes                           
--------- ------ ... ---------------- -----------------------------------------------------------
idvj01p4q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01p5q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01p7q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01p8q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01paq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01pbq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01phq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01piq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01pkq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01plq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01poq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01ppq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
wfc3: grism: coadd: Found 1 unique obsets: ['idvj01']
wfc3: grism: coadd: Co-adding idvj01
wfc3: grism: coadd: idvj01 table for G102 is:
   root   obset  ... planetary_nebula                            notes                           
--------- ------ ... ---------------- -----------------------------------------------------------
idvj01p5q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01p8q idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
idvj01pbq idvj01 ...            False {}: Could not find SPT file for {}. Setting scan rate to 0.
Traceback (most recent call last):
  File "/user/kgordon/anaconda3/envs/abscal/bin/wfc3_coadd", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/user/kgordon/STScI/AbsFlux/ABSCAL/abscal/commands/wfc3_coadd", line 25, in <module>
    main()
  File "/user/kgordon/STScI/AbsFlux/ABSCAL/abscal/commands/wfc3_coadd", line 21, in main
    do_coadd(**kwargs)
  File "/user/kgordon/STScI/AbsFlux/ABSCAL/abscal/wfc3/reduce_grism_coadd.py", line 891, in main
    output_table = coadd(input_table, **vars(parsed), **kwargs)
  File "/user/kgordon/STScI/AbsFlux/ABSCAL/abscal/wfc3/reduce_grism_coadd.py", line 216, in coadd
    spec_file = os.path.join(row['path'], row['extracted'])
  File "/user/kgordon/anaconda3/envs/abscal/lib/python3.10/posixpath.py", line 90, in join
    genericpath._check_arg_types('join', a, *p)
  File "/user/kgordon/anaconda3/envs/abscal/lib/python3.10/genericpath.py", line 152, in _check_arg_types
    raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'MaskedConstant'

from abscal.

karllark avatar karllark commented on June 3, 2024

With all the updates, the example now works! Closing this issue.

from abscal.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.