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

Suggestion: Change the Xstart and Xstop behaviour in the LIS LogPass.setFrameSetChX(...) function #7

Open
erlendviggen opened this issue May 15, 2018 · 0 comments

Comments

@erlendviggen
Copy link

I just tracked down a bug in my code where the last depth frame in a LIS file ended up missing. The bug stemmed from a line where I wanted to read a selection of the channels over the entire depth:

logPass.setFrameSetChX(file, channelMnemList, logPass.xAxisFirstEngVal, logPass.xAxisLastEngVal)

My expected behaviour was to get every frame from logPass.xAxisFirstEngVal to and including logPass.xAxisLastEngVal, while I got every frame to but not including the latter, since TotalDepth here follows the Python convention on ranges.

This makes it somewhat inconvenient to get all frames for a selection of channels, since I suppose it means that you have to specify a stop depth after logPass.xAxisLastEngVal in order to get every frame. Therefore, I have two possible suggestions on how to change this behaviour:

  1. Change the behaviour of LogPass.setFrameSetChX(...) so that it gets the frames to and including the specified stop frame depth. This would make it more convenient to use, although it might not be quite Pythonic.
  2. Make the Xstart and Xstop arguments optional. If they are not specified, then default to getting every frame.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant