NuSTAR / nustar-gen-utils

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

obs.seqid should remove trailing '/' #89

Open bwgref opened 2 years ago

bwgref commented 2 years ago

Right now it depends on how the user input things. For example:

seqid='90701327002' obs = info.Observation(path=f'{top}/', seqid=seqid) print(obs.seqid) seqid='90701327002/' obs = info.Observation(path=f'{top}/', seqid=seqid) print(obs.seqid)

Returns:

90701327002 90701327002/

For utility we should always strip out the trailing '/' and assume that we're correctly using os.path.join internally (which we are, since everything works fine when you use just the numeric sequence ID.