diff --git a/tofu/data/_class09_GeometryMatrix.py b/tofu/data/_class09_GeometryMatrix.py index 670e72f8b..534cff910 100644 --- a/tofu/data/_class09_GeometryMatrix.py +++ b/tofu/data/_class09_GeometryMatrix.py @@ -97,12 +97,14 @@ def add_geometry_matrix( def get_geometry_matrix_concatenated( self, key=None, + key_cam=None, ): """ Assemble the geometry matrix """ return _compute._concatenate( coll=self, key=key, + key_cam=key_cam, ) # ----------------- @@ -147,4 +149,4 @@ def plot_geometry_matrix( fs=fs, dcolorbar=dcolorbar, dleg=dleg, - ) + ) \ No newline at end of file diff --git a/tofu/data/_class10_checks.py b/tofu/data/_class10_checks.py index 15285d5d3..e2c00ff13 100644 --- a/tofu/data/_class10_checks.py +++ b/tofu/data/_class10_checks.py @@ -73,7 +73,7 @@ def _compute_check( ) key_diag = coll.dobj['geom matrix'][key_matrix]['diagnostic'] - # key_cam = coll.dobj['geom matrix'][key_matrix]['camera'] + key_cam = coll.dobj['geom matrix'][key_matrix]['camera'] keybs = coll.dobj['geom matrix'][key_matrix]['bsplines'] deg = coll.dobj['bsplines'][keybs]['deg'] @@ -82,7 +82,10 @@ def _compute_check( mtype = coll.dobj[coll._which_mesh][keym]['type'] # matrix itself - matrix, ref, dind = coll.get_geometry_matrix_concatenated(key_matrix) + matrix, ref, dind = coll.get_geometry_matrix_concatenated( + key_matrix, + key_cam=key_cam, + ) lkmat = coll.dobj['geom matrix'][key_matrix]['data'] units_gmat = coll.ddata[lkmat[0]]['units'] nchan, nbs = matrix.shape[-2:] @@ -98,6 +101,7 @@ def _compute_check( coll=coll, key_diag=key_diag, key_data=key_data, + key_cam=key_cam, ) # sigma @@ -479,12 +483,14 @@ def _check_data( coll=None, key_diag=None, key_data=None, + key_cam=None, ): # load ddata from key_data ddata = coll.get_diagnostic_data_concatenated( key=key_diag, key_data=key_data, + key_cam=key_cam, flat=True, ) @@ -501,6 +507,7 @@ def _check_sigma( coll=None, key_diag=None, key_sigma=None, + key_cam=None, sigma=None, ddata=None, nchan=None, @@ -537,6 +544,7 @@ def _check_sigma( coll=coll, key=key_diag, key_data=key_sigma, + key_cam=key_cam, flat=True, ) diff --git a/tofu/data/_class9_compute.py b/tofu/data/_class9_compute.py index 8e46433b4..3493a4e47 100644 --- a/tofu/data/_class9_compute.py +++ b/tofu/data/_class9_compute.py @@ -479,6 +479,7 @@ def _store( def _concatenate( coll=None, key=None, + key_cam=None, ): # ------------ @@ -491,11 +492,19 @@ def _concatenate( allowed=lok, ) + key_cam0 = coll.dobj['geom matrix'][key]['camera'] + key_cam = ds._generic_check._check_var_iter( + key_cam, 'key_cam', + default=key_cam0, + types=(list, tuple), + types_iter=str, + allowed=key_cam0, + ) + # ----------- # concatenate key_data = coll.dobj['geom matrix'][key]['data'] - key_cam = coll.dobj['geom matrix'][key]['camera'] axis = coll.dobj['geom matrix'][key]['axis_chan'] ref = list(coll.ddata[key_data[0]]['ref'])