ndcube icon indicating copy to clipboard operation
ndcube copied to clipboard

Support Subtract and Division of NDCube by NDData

Open DanRyanIrish opened this issue 3 months ago • 6 comments

To Do

  • [x] Add dask test
  • [x] Rework subtraction to avoid in-place modification
  • [x] Merge #887

DanRyanIrish avatar Aug 15 '25 15:08 DanRyanIrish

@wtbarnes: Do these tests satisfy your comment?

DanRyanIrish avatar Oct 02 '25 14:10 DanRyanIrish

@Cadair @wtbarnes: Docs on Arithmetic operations are now included in this PR. Please let me know if you have comments. If not, I'd appreciate an approval :)

DanRyanIrish avatar Oct 03 '25 13:10 DanRyanIrish

@Cadair it looks like NDData(cube, wcs=None) doesn't actually set the wcs to None! https://github.com/sunpy/ndcube/actions/runs/18262220518/job/51991663154?pr=880

DanRyanIrish avatar Oct 05 '25 17:10 DanRyanIrish

Oh, of course it doesn’t. Well balls.

I'm not really sure what the best option is in that case then.

Cadair avatar Oct 06 '25 10:10 Cadair

Oh, of course it doesn’t. Well balls.

I'm not really sure what the best option is in that case then.

Dare a say it? NDCube.drop_coords() -> NDData?

DanRyanIrish avatar Oct 06 '25 11:10 DanRyanIrish

Oh, of course it doesn’t. Well balls. I'm not really sure what the best option is in that case then.

Dare a say it? NDCube.drop_coords() -> NDData?

Do it

nabobalis avatar Oct 06 '25 17:10 nabobalis