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

Remove uses of attrs and meta and remove deprecated Mantid functions #588

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

jl-wynen
Copy link
Member

This should fix the nightly at main build

@@ -1277,108 +973,6 @@ def load_with_mantid(
)


def load(
Copy link
Member

Choose a reason for hiding this comment

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

Could you also update the PR title so the changelog has information about removal of these deprecated functions?

@jl-wynen jl-wynen changed the title Remove uses of attrs and meta Remove uses of attrs and meta and remove deprecated Mantid functions Jan 13, 2025
@@ -18,7 +18,7 @@
"edges = sc.array(dims=['tof'], unit='us', values=np.linspace(5.0, 100000.0, num=201))\n",
"data = sc.rebin(data, 'tof', edges)\n",
"for i in [1, 2, 3, 4, 5]:\n",
" mon = data.attrs[f'monitor{i}']\n",
" mon = data.coords[f'monitor{i}']\n",
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean that if we then release scipp and bump the version in the deps here, we will no longer be able to load the current tutorial data? (meaning that we have to update the tutorial data)

Copy link
Member Author

Choose a reason for hiding this comment

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

No. We don't actually use the output file directly anywhere. We use a file called loki-at-larmor-filtered.hdf5 but I don't know where it comes from.
The docs seem to still work as before.

It turns out that the code has been broken for a long time because the mantid loader has changed. I fixed the first cell (and split it to make it easier to debug). But I cannot seem to run the next cell because I get a certificate error.

@SimonHeybrock Do you know if this notebook is still needed and how the filtered data was made?

Copy link
Member

Choose a reason for hiding this comment

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

As the title says, this was used to make the files for the event-data tutorials. But I think that is not what you are asking?

Copy link
Member Author

Choose a reason for hiding this comment

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

My point is that it looks like the file was processed further after creating it with this notebook because:

  • it has a different name and
  • the file contains a data group where the monitors are a group item, not a data array attr. The tutorial still works without recreating the files.

Copy link
Member

Choose a reason for hiding this comment

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

Remove it, we can always recover from git history?

@jl-wynen jl-wynen enabled auto-merge January 16, 2025 13:05
@jl-wynen jl-wynen merged commit 7734ed2 into main Jan 17, 2025
5 checks passed
@jl-wynen jl-wynen deleted the remote-attrs branch January 17, 2025 09:47
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.

4 participants