|
reduction, _, _ = await asyncio.to_thread( |
The first return value is not the reduced data, it's the calculated q-space coordinates.
We actually need both, and need to enhance the SAS1DReduction model to take both. Then UI needs to accept both.
So, maybe
q_coordinates, reduction, _ = await asyncio.to_thread(
pixel_roi_horizontal_cut, **reduction_settings
)
plot_array = np.column_stack((q_coordinates, reduction))
serializable_reduction = SerializableNumpyArrayModel(array=plot_array)
reduction_msg = SAS1DReduction(
curve=serializable_reduction, # just the qparrallel, not the cut_average or errors
curve_tiled_url="curve",
raw_frame=message.image,
raw_frame_tiled_url=message.tiled_url,
)
In this case, I think the websocket will change to producing a 2d array instead of a 1D array, and the UI code will need to change so with each item in the array, the first value is x and the second is y. The label might of x will be q. @SeijDeLeon
arroyosas/src/arroyosas/one_d_reduction/operator.py
Line 75 in f9fa0ef
The first return value is not the reduced data, it's the calculated q-space coordinates.
We actually need both, and need to enhance the
SAS1DReductionmodel to take both. Then UI needs to accept both.So, maybe
In this case, I think the websocket will change to producing a 2d array instead of a 1D array, and the UI code will need to change so with each item in the array, the first value is x and the second is y. The label might of x will be
q. @SeijDeLeon