musevlt / mpdaf

MUSE Python Data Analysis Framework
BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

slicing data cube #22

Open wegojobs opened 2 years ago

wegojobs commented 2 years ago

I am having issues with slicing my data cube. With the error, "the sub-cube boundaries lie outside the cube" . I have retried with different radii, but it still gives me the same error. Please someone help.I have been stuck for the last 1 month. Below is the code i am using. from mpdaf.obj import Cube import matplotlib.pyplot as plt plt.ion() cube=Cube(filename='NGC 1097.fits') center=(-30.2837, 41.5688) subCube=cube.subcube(center, 0.1)

RolandBacon commented 2 years ago

It may be a problem with the cube WCS. Can you tell me what is printed out by cube.info() ?

Envoyé de mon iPhone

Le 19 juil. 2021 à 15:17, wegojobs @.***> a écrit :

 I am having issues with slicing my data cube. With the error, "the sub-cube boundaries lie outside the cube" . I have retried with different radii, but it still gives me the same error. Please someone help.I have been stuck for the last 1 month. Below is the code i am using. from mpdaf.obj import Cube import matplotlib.pyplot as plt plt.ion() cube=Cube(filename='NGC 1097.fits') center=(-30.2837, 41.5688) subCube=cube.subcube(center, 0.1)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

wegojobs commented 2 years ago

3682x318x324 Cube(NGC 1097) data (3682x318x324) center(-30:16:29.9612, 02:46:19.0126) size (63.600", 64.800") step (0.2",0.2") rot:-0.0 wavelength range: 4750.32- 9351.57 Angstrom step: 1.25

wegojobs commented 2 years ago

3682x318x324 Cube(NGC 1097) data (3682x318x324) center(-30:16:29.9612, 02:46:19.0126) size (63.600", 64.800") step (0.2",0.2") rot:-0.0 wavelength range: 4750.32- 9351.57 Angstrom step: 1.25 Dorcus

RolandBacon commented 2 years ago

The center you indicate is outside the cube Cube center is 2.77 degree and you ask for 41 degree (center=(-30.2837, 41.5688))


Roland Bacon CRAL - Observatoire de Lyon 9, avenue Charles André 69230 Saint-Genis-Laval tel: +33 478 86 85 59 mobile: +33 608 09 14 27

On 21 Jul 2021, at 14:01, wegojobs @.***> wrote:

3682x318x324 Cube(NGC 1097) data (3682x318x324) center(-30:16:29.9612, 02:46:19.0126) size (63.600", 64.800") step (0.2",0.2") rot:-0.0 wavelength range: 4750.32- 9351.57 Angstrom step: 1.25

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/musevlt/mpdaf/issues/22#issuecomment-884134474, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALIORVA2Z32J7C2MNZHNDYTTY2ZH7ANCNFSM5ATV6N3Q.

am having issues with slicing my data cube. With the error, "the sub-cube boundaries lie outside the cube" . I have retried with different radii, but it still gives me the same error. Please someone help.I have been stuck for the last 1 month. Below is the code i am using. from mpdaf.obj import Cube import matplotlib.pyplot as plt plt.ion() cube=Cube(filename='NGC 1097.fits') center=(-30.2837, 41.5688) subCube=cube.subcube(center, 0.1)