-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
I find observations which has v['tones'] == None, and get_obs fails to load fixed tones as follows.
Implemented workaround for this issue in #1488
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[4], line 16
---> 16 am = ctx.get_obs('oper_1729316258_satp2_0010000', special_channels=True)
File [~/tools/sotodlib_hwp/sotodlib/core/context.py:301](https://mytiger.princeton.edu/node/tiger-g04c4n10/14998/lab/tree/home/kyoheiy/scratch/so_site/nb/~/tools/sotodlib_hwp/sotodlib/core/context.py#line=300), in Context.get_obs(self, obs_id, dets, samples, filename, detsets, meta, ignore_missing, on_missing, free_tags, no_signal, no_headers, special_channels, loader_type)
299 loader_type = self.get('obs_loader_type', 'default')
300 loader_func = OBSLOADER_REGISTRY[loader_type] # Register your loader?
--> 301 aman = loader_func(self.obsfiledb, obs_id, dets=dets,
302 samples=samples, no_signal=no_signal,
303 no_headers=no_headers,
304 special_channels=special_channels)
306 if aman is None:
307 return meta
File [~/tools/sotodlib_hwp/sotodlib/io/load_book.py:182](https://mytiger.princeton.edu/node/tiger-g04c4n10/14998/lab/tree/home/kyoheiy/scratch/so_site/nb/~/tools/sotodlib_hwp/sotodlib/io/load_book.py#line=181), in load_obs_book(***failed resolving arguments***)
179 if not np.array_equal(i1, np.arange(len(signal_buffer))):
180 signal_buffer = signal_buffer[i1]
--> 182 obs = _concat_filesets(results, ancil, timestamps,
183 sample0=samples[0], obs_id=obs_id,
184 signal_buffer=signal_buffer,
185 get_frame_det_info=False)
186 return obs
File [~/tools/sotodlib_hwp/sotodlib/io/load_book.py:522](https://mytiger.princeton.edu/node/tiger-g04c4n10/14998/lab/tree/home/kyoheiy/scratch/so_site/nb/~/tools/sotodlib_hwp/sotodlib/io/load_book.py#line=521), in _concat_filesets(results, ancil, timestamps, sample0, obs_id, dets, signal_buffer, get_frame_det_info)
520 tone_info = []
521 for v in results.values():
--> 522 d = v['tones'].finalize()
523 n_tones += d.shape[0]
524 for k in v['tones'].keys:
525 # Should look like this: sch_NONE_2_326
File [~/tools/sotodlib_hwp/sotodlib/io/load_book.py:917](https://mytiger.princeton.edu/node/tiger-g04c4n10/14998/lab/tree/home/kyoheiy/scratch/so_site/nb/~/tools/sotodlib_hwp/sotodlib/io/load_book.py#line=916), in Accumulator2d.finalize(self)
915 pass
916 elif self.shape is None:
--> 917 self.data = np.hstack(self.data)
918 return self.data
File /scratch/gpfs/SIMONSOBS/env/v0.6.3/soconda_v0.6.3/lib/python3.11/site-packages/numpy/_core/shape_base.py:218, in _vhstack_dispatcher(tup, dtype, casting)
217 def _vhstack_dispatcher(tup, *, dtype=None, casting=None):
--> 218 return _arrays_for_stack_dispatcher(tup)
File /scratch/gpfs/SIMONSOBS/env/v0.6.3/soconda_v0.6.3/lib/python3.11/site-packages/numpy/_core/shape_base.py:211, in _arrays_for_stack_dispatcher(arrays)
209 def _arrays_for_stack_dispatcher(arrays):
210 if not hasattr(arrays, "__getitem__"):
--> 211 raise TypeError('arrays to stack must be passed as a "sequence" type '
212 'such as list or tuple.')
214 return tuple(arrays)
TypeError: arrays to stack must be passed as a "sequence" type such as list or tuple.
Metadata
Metadata
Assignees
Labels
No labels