-
Notifications
You must be signed in to change notification settings - Fork 11
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
macOS dmg comments #81
Comments
Hi, Thanks for the feedback. I don't have a Mac to test Peakaboo on, so I'm never completely sure that a release will work properly on it. I think I've implemented the changes you suggested, and I've created a new test build here: http://nathaniel-desktop.beowulf.uwo.ca/Peakaboo/Peakaboo%205.1.0.dmg. Let me know if those changes resolve the issues you're having and I'll update the releases page. We can absolutely look into adding support for the HDF5/Nexus files; we already have some other file formats supported which use HDF5 containers. On Peakaboo's end, the code would need to implement the DataSource interface. There's other code designed to make implementing this interface easier, but this is the core of it. For a more practical example, the PlainText plugin is how Peakaboo reads CSV files. Any chance you could point me at the HDF5/Nexus source on your end? |
Hello again, The new app bundle is a lot better: thanks for that Our hdf5 plugin resides at https://github.com/DawnScience/dawn-hdf. It really just wraps the official HDF5 Java bindings in an eclipse plugin, and includes the platform dependent HDF5 shared libraries. The Nexus reader code is at https://gerrit.diamond.ac.uk/plugins/gitiles/scisoft/dawnsci/+/master/org.eclipse.dawnsci.nexus/ (no GitHub mirror at the moment). This one will drag in a lot of other plugins though. I noticed that you are using a modified version of my xraylib jar: if you think that your changes are useful for the official release, feel free to submit a pull request to include them. Best, Tom |
I've updated the releases page with the improved app bundle. Any suggestions for the best way to start going through the Nexus code? I'm not sure if I should be looking at the autogen code or not, for example. If linking the software is going to take a bit, and if the file format isn't too complicated, maybe a good first step would be to just write something quick that can handle the basics. Do you have any sample data that you're able to send to me? I don't think I made any changes to Xraylib, but I couldn't find it in maven, so I bundled it in a little local repository. |
Cool! Thanks
Hmm you may want to have a look at
I will ask around for a file I can give you for testing.
Ok. So what would I need to add to make it acceptable for maven? Just a pom.xml file? |
There are two ways to open a Nexus file:
|
Adding the pom.xml file would let you build the project with maven, but actually uploading code to the maven central repository is something I've never explored myself. I'm still trying to figure out how to properly build the code. I've downloaded a copy of:
Any documentation (or a pre-built jar)? |
Based on the travis.yml file, it would seem that you need to rename the dawnsci directory to org.eclipse.dawnsci. If you would like to get your hands on pre-built jars, I recommend you download the latest version of DAWN from https://dawnsci.org |
I made some progress with the maven build, but ran into problems later on.
I got the jars from DAWN, and that seems to be working for now. At least, my IDE shows no errors. Am I correct in understanding that a Nexus files can contain more than one dataset? If so, I think the next step is to figure out how to get a list of those datasets for the user to choose from. I see a way to iterate over attributes, but not nodes. |
HDF5 is like a file system inside a file with groups acting like directories. Read the fine Nexus user manual |
The January source is hosted here in case you would need it. Nexus files can indeed contain multiple datasets, and they often do here at Diamond Light Source. To iterate over nodes, you will need to start with the root. Something like this: NexusFile file = NexusFileHDF5.openNexusFile("yourNexusFile.nxs");
String rootName = file.getRoot();
GroupNode rootNode = file.getGroup(rootName, false);
List<GroupNode> nodes = rootNode.getGroupNodes(); |
I was able to find a random .nsx sample file here: From looking at it in HDFView, It looks like the schema being used here is |
@tschoonj I think I've done about all I can without a proper sample file to look at. Any luck finding one? |
I have asked around for one but no response yet... I'll ask some other people... Either way, the Usually there will be one or more Hope this helps... |
I'll also add that, until we get some good sample data to test this plugin with, there is one other option for trying out Peakaboo. If you can convert an existing dataset to a csv/tsv file with one spectrum per row, Peakaboo will be able to open that. It loses all the meta-data, but it gets the data imported. |
I have asked 3 of our principal beamline scientists but no reply... Thanks for the CSV suggestion: I will give it a try but I am kind of busy at the moment... |
Hi,
I stumbled onto your project and decided to give it a go but ran into a couple of issues. I hope you will find this useful.
The DMG image contains a single folder called
Contents
. This folder is on its own unusable as it needs to be put in a folder called Peakaboo.app. Afterwards Peakaboo starts as expected.One other problem I noticed is that it looks horrible on retina HIDPI screens (like mine). This could be fixed by adding:
to Info.plist.
Afterwards things look much better.
However I still couldn't really test your app as it doesn't support HDF5/Nexus files 😢
Any chance you could add support for these file formats? We have plenty of java code for it in DAWN...
Best,
Tom
The text was updated successfully, but these errors were encountered: