(filename, path, inqueue, outqueue)
| 42 | |
| 43 | |
| 44 | def run(filename, path, inqueue, outqueue): |
| 45 | try: |
| 46 | yslice = inqueue.get() |
| 47 | h5file = synchronized_open_file(filename, mode="r") |
| 48 | h5array = h5file.get_node(path) |
| 49 | data = h5array[yslice, ...] |
| 50 | psum = np.sum(data) |
| 51 | except Exception as e: |
| 52 | outqueue.put(e) |
| 53 | else: |
| 54 | outqueue.put(psum) |
| 55 | finally: |
| 56 | synchronized_close_file(h5file) |
| 57 | |
| 58 | |
| 59 | def main(): |
nothing calls this directly
no test coverage detected