ezmsg-org / ezmsg

Pure-Python DAG-based high-performance SHM-backed pub-sub and multi-processing pattern
https://ezmsg.readthedocs.io/en/latest/
MIT License
15 stars 6 forks source link

bugfix: Spectrum should pop transformed axis out of out_msg.axes #48

Closed cboulay closed 1 year ago

cboulay commented 1 year ago

The outgoing message has axes field that includes the old axis (e.g. "time") even if it is no longer present because it was overwritten by "freq".

Editing this code should work:

        new_dims = [d for d in message.dims]
        if self.SETTINGS.out_axis is not None:
            new_dims[axis_idx] = self.SETTINGS.out_axis
            if self.SETTINGS.out_axis != axis_name:
                _ = new_axes.pop(axis_name)
griffinmilsap commented 1 year ago

Merged into dev; thanks!