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

Issue with ADSObserver functions #105

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/shiver/models/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,12 +587,16 @@ def filter_ws(name):

def get_frame(name):
"""Returns the MDE frame for the given workspace name"""
return mtd[name].getSpecialCoordinateSystem().name
if hasattr(mtd[name], "getSpecialCoordinateSystem"):
return mtd[name].getSpecialCoordinateSystem().name
return None


def get_num_non_integrated_dims(name):
"""Returns the number of non-integrated dimensions"""
return len(mtd[name].getNonIntegratedDimensions())
if hasattr(mtd[name], "getNonIntegratedDimensions"):
return len(mtd[name].getNonIntegratedDimensions())
return -1


def dim2array(dim, center=True) -> np.ndarray:
Expand Down
Loading