refactor extract_subcube to use spectral_cube