Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error with self.bc_sel after nicerl2 is called #47

Closed
nkphysics opened this issue Jan 11, 2023 · 1 comment · Fixed by #48
Closed

Unexpected error with self.bc_sel after nicerl2 is called #47

nkphysics opened this issue Jan 11, 2023 · 1 comment · Fixed by #48
Assignees
Labels
bug Something isn't working
Projects

Comments

@nkphysics
Copy link
Owner

Please see the following error message fr investigation. This happened after processing multiple datasets with autonicer --checkcal --reprocess --bc --compress -i *

Migrating to 1060010101
Latest NICER CALDB: xti20221001

######## Decompressing None ########
ni1060010101_0mpu7_cl.evt.tar.gz extracted
ni1060010101_0mpu2_ufa.evt.tar.gz extracted
ni1060010101_0mpu1_ufa.evt.tar.gz extracted
ni1060010101_0mpu6_ufa.evt.tar.gz extracted
ni1060010101_0mpu0_ufa.evt.tar.gz extracted
ni1060010101_0mpu4_ufa.evt.tar.gz extracted
ni1060010101_0mpu3_ufa.evt.tar.gz extracted
ni1060010101_0mpu5_ufa.evt.tar.gz extracted
ni1060010101_0mpu7_ufa.evt.tar.gz extracted
##############  Auto NICER  ##############

nicerl2 1.27
--------------------------------------------------------
      ang_dist = 0.015
      attfile = $INDIR/auxil/ni$OBSID.att
      autoscreen = YES
      br_earth = 30
      calstation = FLIGHT
      cldir = $INDIR/xti/event_cl
      cleanup = 1
      cleanup_ufa_files = 0
      clfile = $CLDIR/ni$OBSID_0mpu7_cl.evt
      clobber = 1
      cor_range = *-*
      dec = OBJ
      detlist = launch
      elv = 15
      filtcolumns = NICERV4
      geomag_columns = FILTCOLUMNS
      geomag_path = DEFAULT
      gtifiles = NONE
      gzip_thresh = 50
      history = 1
      hkdir = $INDIR/xti/hk
      hkpat = $HKDIR/ni??????????_?mpu?.hk{,.gz}
      incremental = 0
      indir = None/
      issmanfile = CALDB
      leapinit = AUTO
      min_fpm = 7
      mkfile = $INDIR/auxil/ni$OBSID.mkf
      mpugtimerge = OR
      mpugtiscr = DEFAULT
      mpulist = 0-6
      nicercal_filtexpr = EVENT_FLAGS=bxxxx00
      nicerclean_args = NONE
      nicersaafilt = YES
      nimaketime_gtiexpr = NONE
      niprefilter = 1
      niprefilter2 = 1
      niprefilter2_coltypes = FILTCOLUMNS
      noise25scr = DEFAULT
      noiseextscr = DEFAULT
      orbfile = $INDIR/auxil/ni$OBSID.orb
      overonly_expr = NONE
      overonly_range = *-30
      overonlyscr = DEFAULT
      picalfile = CALDB
      pifastcalfile = CALDB
      pirange = 20:1500
      prefilter_columns = FILTCOLUMNS
      ra = OBJ
      robofile = CALDB
      roundrobbinscr = DEFAULT
      saafilt = NO
      saaregfile = NONE
      st_valid = YES
      tasks = ALL
      timebiascalfile = CALDB
      trackfilt = YES
      trumpetfilt = YES
      trumpetkeep = GOOD
      ufafile = $CLDIR/ni$OBSID_0mpu7_ufa.evt
      ufdir = $INDIR/xti/event_uf
      ufpat = $UFDIR/ni??????????_?mpu?_uf.evt{,.gz}
      underonly_range = 0-500
      underonlyscr = DEFAULT
      vehiclefile = CALDB
  MPU List: 0-6
         Requested task operations: CALMERGE,SCREEN,MKF
       Processed prefilter_columns: NICERV4,-MPU_OVER_COUNT,-MPU_UNDER_COUNT,-MPU_XRAY_COUNT,-MPU_ALL_COUNT
   Processed niprefilter2_coltypes: BASE,NICERV4
          Processed geomag_columns: kp_potsdam.fits(KP),solarphi_oulu.fits(SOLAR_PHI),COR_NYM
ERROR: input directory None does not exist at /home/nick/heasoft-6.31/x86_64-pc-linux-gnu-libc2.35/bin/nicerl2 line 253.
Task nicerl2 1.27 terminating with status -1
Traceback (most recent call last):
  File "/home/nick/.local/lib/python3.10/site-packages/autonicer/reprocess.py", line 198, in inlist
    raise FileNotFoundError
FileNotFoundError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nick/.local/bin/autonicer", line 8, in <module>
    sys.exit(run())
  File "/home/nick/.local/lib/python3.10/site-packages/autonicer/__init__.py", line 67, in run
    inlist(argp)
  File "/home/nick/.local/lib/python3.10/site-packages/autonicer/reprocess.py", line 210, in inlist
    reprocess_check(argp, curr_cals)
  File "/home/nick/.local/lib/python3.10/site-packages/autonicer/reprocess.py", line 175, in reprocess_check
    check.reprocess(argp.bc, argp.compress)
  File "/home/nick/.local/lib/python3.10/site-packages/autonicer/reprocess.py", line 161, in reprocess
    an.reduce(self.obsid)
  File "/home/nick/.local/lib/python3.10/site-packages/autonicer/autonicer.py", line 326, in reduce
    if self.bc_sel.lower() == "n":
AttributeError: 'bool' object has no attribute 'lower'
@nkphysics nkphysics added the bug Something isn't working label Jan 11, 2023
@nkphysics nkphysics self-assigned this Jan 11, 2023
@nkphysics nkphysics added this to To do in v1.3 via automation Jan 11, 2023
@nkphysics nkphysics moved this from To do to In progress in v1.3 Jan 11, 2023
@nkphysics
Copy link
Owner Author

Reprocessed without any errors on its own.

From an initial look into the error message it appears that the bc in

class AutoNICER(object):
  def __init__(self, src=None, bc=None, comp=None):

was not set so, either error handling will need to be better implemented or this could be fixed by just changing the default value

v1.3 automation moved this from In progress to Done Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
v1.3
Done
Development

Successfully merging a pull request may close this issue.

1 participant