import h5py

"""
Read data from compressed nexus file and write it to a new uncompressed one.
"""
with h5py.File('SANS_test.nxs', 'r') as f_read:
    data_1 = f_read.get('/raw_data_1/detector_1_events/event_frame_number')

    with h5py.File('SANS_test_uncompressed.hdf5', 'w') as f_write:
        print(data_1[...])
        g = f_write.create_group('/raw_data_1/detector_1_events')
        g['event_frame_number'] = data_1[...]

@@ -95,80 +95,202 @@
 %22%22%22%0A
-with h5py.File('SANS_test.nxs', 'r') as f_read:%0A    data_1 = f_read.get(
+%0Adatasets = %5B%0A    '/raw_data_1/detector_1_events/event_id',%0A    '/raw_data_1/detector_1_events/total_counts',%0A    '/raw_data_1/detector_1_events/event_index',%0A    '/raw_data_1/good_frames',%0A    
 '/ra
@@ -326,28 +326,24 @@
 ent_
-frame_number')%0A%0A    
+time_offset'%0A%5D%0A%0A
 with
@@ -409,127 +409,259 @@
     
-    print(data_1%5B...%5D)%0A        g = f_write.create_group('/raw_data_1/detector_1_events')%0A        g%5B'event_frame_number'
+pass%0A%0Awith h5py.File('SANS_test.nxs', 'r') as f_read:%0A    for dataset in datasets:%0A        data_1 = f_read.get(dataset)%0A%0A        with h5py.File('SANS_test_uncompressed.hdf5', 'r+') as f_write:%0A            print(data_1%5B...%5D)%0A            f_write%5Bdataset
 %5D = 

write all required datasets to uncompressed hdf5 file