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

Added ingest methods to move experimental data to aimmdb #23

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jmaruland
Copy link
Contributor

This PR adds the methods that were used to ingest aimmdb with all of the experimental data that was provided by the effort of beamline scientists that are part of the AIMM project

@@ -22,7 +22,8 @@
import xraydb
from tiled.adapters.dataframe import DataFrameAdapter
from tiled.adapters.mapping import MapAdapter
from tiled.server.object_cache import with_object_cache

# from tiled.server.object_cache import with_object_cache

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this uncomment intended? I don't see with_object_cache used...plus, aren't we only using tiled client code to ingest?

Copy link
Contributor Author

@jmaruland jmaruland Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are some comments that I left there temporarily. We used this approach while we were taking the first steps of using cache to build the Adapters in tiled. But with_object_cache doesn't exist in tiled anymore. I am wondering if there is different approach now that I might have missed, or I can use the build_reader method directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you read this diff backward, @dylanmcreynolds? The cache is being removed here.

I had a quick chat with @jmaruland on this. I think the Heald Adapter code could be repurposed on the client side as a parser, but fully agree that caching in the adapter has no value in that context.

image

Copy link

@dylanmcreynolds dylanmcreynolds Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you read this diff backward, @dylanmcreynolds? The cache is being removed here.

Sorry about that.

I think the Heald Adapter code could be repurposed on the client side as a parser, but fully agree that caching in the adapter has no value in that context

If I catch you correctly, we proposing using this code once per file to get into XDI-ish format on upload rather than every time the client gets the file?

Copy link
Contributor Author

@jmaruland jmaruland Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The story behind it is that, back then, when I was assigned as the "Gatekeeper" of AIMMdb, I received raw files in multiple formats from scientists of all three facilities which led me to build this collection of scripts that would allow me to save time in the future if I ever had to ingest more files to AIMMdb.
After the meeting I had with Monika last week, I am sure that you guys are mostly interested in the aimm_ingest.py::ingest_aimm_ncm_gihyeok_sigscan method to ingest the files that you have. I saw the files that you have at the moment, and they are very similar to a collection of files that I received from Gihyeok.
Keep in mind that these ingest methods were created when we still had the tiled tree model of key/value pairs that we built with Joe. This model is not being used in the latest version of AIMMdb and you might have to remove lines like this one:
https://github.com/jmaruland/aimm-adapters/blob/add-ingesting-methods/aimm_adapters/aimm_ingest.py#L606

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.

3 participants