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

When SOD in all scans are the same, the code generate an empty sod_det list #1

Open
DamonLee5 opened this issue Mar 8, 2023 · 0 comments

Comments

@DamonLee5
Copy link

I tried to run the code with the same SODs.
However, a bug came up and said,

max argument is an empty sequence

max_mag = max([(sdd_smpl-sod_smpl)/sod_smpl for sdd_smpl,sod_smpl in zip(sdd,sod)])

I tried to look up to find that empty list, it is created in the below line,
In mainsr.py

elif sod[i] > sod_avg and not only_src:
.

My suggestion is that use <= instead of < to avoid this error.
I did this in my local branch and it can successfully run without any trouble.

DamonLee5 referenced this issue in DamonLee5/pysaber Mar 8, 2023
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