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

extract_particles and simulate_ctf: fixes #774

Merged
merged 6 commits into from
May 13, 2024
Merged

extract_particles and simulate_ctf: fixes #774

merged 6 commits into from
May 13, 2024

Conversation

cossorzano
Copy link
Contributor

Simulate CTF can add noise before and after CTF.
Bug fix in the downsampling factor of extract particles

Copy link

sonarcloud bot commented Mar 21, 2024

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@albertmena albertmena changed the title Co fixes extract_particles and simulate_ctf: fixes May 6, 2024
if self.noiseBefore>0:
I=xmippLib.Image(fnIn)
Idata = I.getData()
I.setData(Idata+self.noiseBefore.get()*np.random.normal(size=Idata.shape))

Check notice

Code scanning / SonarCloud

numpy.random.Generator should be preferred to numpy.random.RandomState Low

Use a "numpy.random.Generator" here instead of this legacy function. See more on SonarCloud
if self.noiseAfter>0:
I=xmippLib.Image(fnOut)
Idata = I.getData()
I.setData(Idata+self.noiseAfter.get()*np.random.normal(size=Idata.shape))

Check notice

Code scanning / SonarCloud

numpy.random.Generator should be preferred to numpy.random.RandomState Low

Use a "numpy.random.Generator" here instead of this legacy function. See more on SonarCloud
@albertmena albertmena self-requested a review May 13, 2024 08:15
Copy link

sonarcloud bot commented May 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@albertmena albertmena merged commit d727d42 into devel May 13, 2024
2 checks passed
@albertmena albertmena deleted the co_fixes branch May 13, 2024 08:37
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.

None yet

2 participants