-
Notifications
You must be signed in to change notification settings - Fork 25
ImageSource.save Optics Block #1337
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
Conversation
garrettwrong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks. Couple minor things noted.
Can you add a test that covers slicing the source? I don't think arbitrary slicing will mess up your logic, but it might in the future. Better to add test now while it works :D.
If you haven't let's make sure you can convert some real STAR files that we use. (Read them in and write them out in a re-usable way, ideally with the user doing nothing...). If we can't, that is going to be a problem and I'm not sure we could take the code yet. This may be fine already, so don't interpret it as a code criticism 😇 .
Can we document in a tutorial an example that shows generating a realistic Simulation, saving with this new format, and loading with Relion? (This can be a non-running, display only, example). I see your testing that we can load one back ourselves, but, we're probably not the target application...
Thanks!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1337 +/- ##
===========================================
+ Coverage 90.69% 90.72% +0.02%
===========================================
Files 135 135
Lines 14503 14558 +55
===========================================
+ Hits 13154 13208 +54
- Misses 1349 1350 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
934a2cd to
a3d6381
Compare
|
Here are some updates for the recent changes to this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example looks good, thanks for adding. Two tiny changes and two questions.
9eee908 to
e97af3f
Compare
|
Investigating these failures that popped up after updating the branch. Appears to be related to |
Ok, looks like |
e97af3f to
ad42fe3
Compare
ad42fe3 to
166a431
Compare
janden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just one comment.
| @amplitudes.setter | ||
| def amplitudes(self, values): | ||
| return self.set_metadata("_rlnAmplitude", np.array(values, dtype=self.dtype)) | ||
| values = np.asarray(values, dtype=np.float64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe document why float64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Added a comment. Thanks!
…-generated dummy values when loading. Unit test.
166a431 to
41adb21
Compare
Save
ImageSource's with Relion >= 3.1 convention for starfiles, with separatedata_opticsanddata_particleblocks.Some other additions in this PR are:
amplitudesin doubles_rlnAmplitudemetadata field to_aspireAmplitude, since_rlnAmplitudeis not a valid Relion field nameImageSourcemrcs files with pixel/voxel size in header. Some Relion command line tools extract pixel size (angpix) from here._rlnImageSizeand_rlnImageDimensionality