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

Redundant lines: 2 bug fixes + synthetic warning #49

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

Didou09
Copy link
Collaborator

@Didou09 Didou09 commented Jan 12, 2022

Motivations:

  • Bugfix to set dict keys to ADAS indexing was not working properly when index_lines=False because:
    • isel was not defined (but used)
    • dict key was set priori to shifting
  • Lines with redundant wavelength in a adf15 file seem to be more common than orignally thought and several uneasy cases can occur.

Main proposed changes:

  • The 2 bugs are fixed
  • A synthetic warning is raised when lines are shifted due to redundancy, it lists all lines and wavelength and makes visible some uneasy cases with mulitple redundancies and/or unfortunate discrepancies exactly equal to the implemented shift by +1e-6 A.
  • See here for details and thoughts on possible solutions.

Feel free to merge or just to use as back-up.

@fsciortino
Copy link
Owner

thanks for catching those bugs @Didou09 ! I'll merge this as it is (I don't seem to be able to push to your fork, so I cannot make changes in this PR, I think...), but then I will also immediately change the 1e-6 factors to 1e-10, just in case.

As you know, changing default behavior for such a function would be a bit of a problem for backwards compatibility... indeed it would probably affect a few users. I would prefer to leave the default as it is now for the moment, but remind people to set their value of index_lines explicitly when they use this function to avoid future issues.

@fsciortino fsciortino merged commit ddec3c4 into fsciortino:master Jan 12, 2022
@Didou09
Copy link
Collaborator Author

Didou09 commented Jan 12, 2022

OK, do you want for future PRs, that I push on a dedicated branch in your repo instead of doing it via my fork ?
This way you would be able to push to said branch.

If that solution is better for you you need to make sure to include me as a collaborator in your settings so I can actually push to your repo direcly, on non-critical branches.

@fsciortino
Copy link
Owner

just added you as collaborator 👍

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

Successfully merging this pull request may close these issues.

2 participants