Skip to content

Comments

Various fixes#22

Merged
celiafish merged 19 commits intoNSLS2:masterfrom
psavery:bnl-updates
Jan 30, 2026
Merged

Various fixes#22
celiafish merged 19 commits intoNSLS2:masterfrom
psavery:bnl-updates

Conversation

@psavery
Copy link

@psavery psavery commented Jan 23, 2026

This PR mostly includes various fixes requested by @aaron4444. He has been working from the branch on VDI that includes these, so he has been testing them. A few small new features include:

  • Adds ability to load SIDs from txt files
  • Allow CSV output filename to be specific in PyXRF workflow
  • Allow parent ptychography directory to be selected by the user (and we will auto-select the correct one inside)

We can't do `if zeroDegreeTiltImage`, because `zeroDegreeTiltImage`
might be a numpy array which cannot be converted to a boolean.

Instead, check the size, but only if it is not `None`.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This maximum was too large for whatever integer type Qt was using,
and Qt could not set it correctly. We have to reduce it.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
It seems that somewhere unknown, the progress data is getting
deleted, even though it is supposed to be just a shallow copy. This
is causing crashes.

If we make a deep copy, it avoids the problem. It's probably not
that expensive to do, either, since the data object is empty.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This is necessary. It was deleted by accident.

This also removes the installation of the `views.py` file which does
not exist.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This helps the user see the live updates much more easily. You used
to have to create a volume yourself to actually see the updates. So
I think this will enable a lot more users to utilize these live
update features more successfully.

It also fixes some strange crash that would happen if the data was
auto-updated but no visualization module had ever been created
for that child data source. I spent two hours trying to determine
the cause of the crash, but was not successful.

However, this update is needed anyways, and it fixes the crash.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This is opposed to the numpy syntax, which is not inclusive of the last
number.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This simply modifies the SID filter to only include the SIDs found
within the txt file.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This allows the user to specify the path to the CSV log file when
they are either creating a new dataset or just remaking the CSV file.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Aaron was clicking these buttons every time: +Z and -90 degrees.
We can automate it so he does not need to do that.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This allows individual threaded operators to be executed externally,
if specified so in the json file.

It does so by using a wrapper around the transform to determine whether
to invoke the operator in a normal way, or instead launch a subprocess where
an external `tomviz-pipeline` executes it.

This is a work in progress, so we might move around how things are done.

We should use this same transform wrapper to automatically add
`@apply_to_each_array`, unless a particular setting is present which
says not to.

I also had to change our usage of `np.bytes_` in the `tomviz-pipeline`
code because the old behavior apparently broke.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@psavery
Copy link
Author

psavery commented Jan 23, 2026

@celiafish

celiafish
celiafish previously approved these changes Jan 29, 2026
@celiafish
Copy link
Collaborator

Got the failure actions. Would you like to address that? @psavery

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@psavery
Copy link
Author

psavery commented Jan 29, 2026

Unfortunately, it looks like the recent release of pandas (version 3.0.0) broke this line in the xrf tomo library.

The issue is that, starting in pandas 3.0.0, that use series that gets pulled out of the dataframe is using a numpy array internally, and we can't set use[n] = True, since True is a boolean and doesn't match the numpy array type of int64.

I can put up a PR for fixing it on xrf-tomo. A short-term fix is to just pin the pandas version to be less than 3.0. This is for the pyxrf-utils environment, so we will do that in this pixi file, and I will also pin the pandas version for the tests too. I'll do these things tomorrow.

See: NSLS-II-SRX/xrf-tomo#10

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@psavery
Copy link
Author

psavery commented Jan 30, 2026

Okay, I pushed a commit to pin the pandas versions that I believe should work.

See NSLS-II-SRX/xrf-tomo#10 for the fix on xrf-tomo.

@celiafish celiafish merged commit 6b1f495 into NSLS2:master Jan 30, 2026
3 checks passed
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.

2 participants