Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions sasdata/data_io/importers/import_hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
from sasdata.quantities.quantity import NamedQuantity, Quantity
from sasdata.quantities.unit_parser import parse

# test_file = "./example_data/1d_data/33837rear_1D_1.75_16.5_NXcanSAS_v3.h5"
# test_file = "./example_data/1d_data/33837rear_1D_1.75_16.5_NXcanSAS.h5"
test_file = "./example_data/2d_data/BAM_2D.h5"
# test_file = "./example_data/2d_data/14250_2D_NoDetInfo_NXcanSAS_v3.h5"
# test_file = "./example_data/2d_data/33837rear_2D_1.75_16.5_NXcanSAS_v3.h5"
test_file = "./test/sasdataloader/data/nxcansas_1Dand2D_multisasdata.h5"
# test_file = "../example_data/1d_data/33837rear_1D_1.75_16.5_NXcanSAS_v3.h5"
# test_file = "../example_data/1d_data/33837rear_1D_1.75_16.5_NXcanSAS.h5"
test_file = "../../../sasdata/example_data/2d_data/BAM_2D.h5"
# test_file = "../example_data/2d_data/14250_2D_NoDetInfo_NXcanSAS_v3.h5"
# test_file = "../example_data/2d_data/33837rear_2D_1.75_16.5_NXcanSAS_v3.h5"
#test_file = "../../../test/test_files/data/nxcansas_1Dand2D_multisasdata.h5"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As discussed, change all file addresses to match the format of the BAM_2D.h5 file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've addressed this in #258


logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -442,7 +442,7 @@ def load_data(filename: str | Path) -> dict[str, SasMeasurement]:
entry_key = entry.attrs["sasview_key"] if "sasview_key" in entry.attrs else root_key

loaded_data[entry_key] = SasMeasurement(
name=root_key,
name=metadata.title if metadata.title else entry_key,
dataset_type=dataset_type,
data_contents=data_contents,
metadata=metadata,
Expand Down
2 changes: 1 addition & 1 deletion test/test_files/reference/MAR07232_rest.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sasentry01
MAR07232_rest_out.dat
Qy
Qx
I
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sasentry01
MH4_5deg_16T_SLOW
Qy
Qx
I
Expand Down
4 changes: 2 additions & 2 deletions test/test_files/reference/nxcansas_1Dand2D_multisasentry.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sasentry01
MH4_5deg_16T_SLOW
dQ
Q
I
Expand Down Expand Up @@ -45,7 +45,7 @@ Source:
Max. Wavelength: None
Wavelength spread: None
Beam size: None
sasentry02
MH4_5deg_16T_SLOW
Qy
Qx
I
Expand Down
Loading