NuSTAR / nustar-gen-utils

Repository for (hopefully) useful NuSTAR python tools
MIT License
9 stars 9 forks source link

regions v0.6 issues #93

Closed bwgref closed 1 year ago

bwgref commented 2 years ago

Seems to be some issues using regions 0.6 with some meta data when doing the region checking.

bwgref commented 2 years ago

For now, forcing regions==0.5 in requirements.txt until I figure out what changed in the metadata. #94

mgullik commented 1 year ago

Hi Brian, I also faced a problem with the new version of the region package. I noticed that the metadata 'include' returns 1 and not True.
I tried implementing a solution that doesn't break the code for regions version 0.5

for ri in reg: assert ri.meta['include'] == 1 or ri.meta['include'] is True, \ f'\n {regfile} has an exclusion region first! \n Put the source region first instead!' break

If it works I can create a PR, but since it is one line of code you can also change it directly. Let me know what you think.

Gullo

bwgref commented 1 year ago

@mgullik I think there are more API changes in regions that were causing problems...have you made these local changes and made sure it all works?

bwgref commented 1 year ago

Closed in #112

mgullik commented 1 year ago

Hi @bwgref,

sorry I couldn't answer before. I saw you changed the assert to check the region. I think it should work now.