ndcube icon indicating copy to clipboard operation
ndcube copied to clipboard

Add a remove method to ExtraCoords for removing a coordinate

Open DanRyanIrish opened this issue 4 years ago • 1 comments

Description

DanRyanIrish avatar Feb 08 '21 17:02 DanRyanIrish

Hey @DanRyanIrish , I'd like to make a PR for this.

From what I gather, here we need a .remove() method that will simply remove a tuple from the the self._lookup_tables, which corresponds to the coordinates specified by the user (originally added over here):

https://github.com/sunpy/ndcube/blob/947799ea213728d6215cb791508ef186ca53b24f/ndcube/extra_coords/extra_coords.py#L206

My doubt here is, is .remove() expected to take the user input similar to .add() ? (name, array_dimension and lookup_table). If so then we can just replicate what the .add() method does and remove the finally generated tuple from the list.

Or is there something else .remove() should do that I'm missing over here ?

kc611 avatar Mar 13 '21 16:03 kc611