You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting some error while running the Coronagraph_Basic.ipynb notebook. Specifically at cell 14 of the notebook, where obs.gen_roll_image() is called. It seems like there is an array size mismatch while adding some images.
What I Did
the parameter, fov_pix, is set to 321 in the notebook, I changed it to 320 to be consistent with wind_modevalue. I don’t get any error and I am able to generate some contrast plots that looks nearly same as shown in the remote notebooks.
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
0%| | 0/3 [00:11<?, ?it/s]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[14], line 12
9 for wfe_drift in tqdm(wfe_list):
10 # Assume drift between Roll1 and Roll2 is 2 nm WFE
11 wfe_roll_drift = 0 if wfe_drift<2 else 2
---> 12 hdulist = obs.gen_roll_image(PA1=PA1, PA2=PA2,
13 wfe_ref_drift=wfe_drift, wfe_roll_drift=wfe_roll_drift)
14 hdul_dict[wfe_drift] = hdulist
File ~/repos/pynrc/pynrc/obs_nircam.py:1942, in obs_hci.gen_roll_image(self, PA1, PA2, return_oversample, no_ref, opt_diff, fix_sat, ref_scale_all, wfe_drift0, wfe_ref_drift, wfe_roll_drift, xyoff_roll1, xyoff_roll2, xyoff_ref, interp, **kwargs)
1940 if interp is None:
1941 interp = 'linear' if ('FULL' in self.det_info['wind_mode']) else 'cubic'
-> 1942 im_roll1 = self.gen_slope_image(PA=PA1, xyoff_asec=xyoff_asec1, im_star=im_star,
1943 return_oversample=True, interp=interp, **kwargs)
1945 if no_ref and (roll_angle==0):
1946 _log.warning('If no_ref=True, then PA1 must not equal PA2. Setting no_ref=False')
File ~/repos/pynrc/pynrc/obs_nircam.py:1615, in obs_hci.gen_slope_image(self, PA, xyoff_asec, return_oversample, exclude_disk, exclude_planets, exclude_noise, zfact, do_ref, do_roll2, im_star, sat_val, wfe_drift0, wfe_ref_drift, wfe_roll_drift, shift_method, interp, apply_distortions, diffusion_sigma, kipc, kppc, psf_corr_over, **kwargs)
1612 fzodi = frebin(fzodi, scale=oversample)
1614 # Combine components
-> 1615 im_final_over = im_star + im_disk + im_pl + fzodi
1617 # Noise per detector pixel
1618 if not exclude_noise:
ValueError: operands could not be broadcast together with shapes (642,642) (640,640)
The text was updated successfully, but these errors were encountered:
asahooexo
changed the title
Getting some variable size error while running Coronagraph_Basic.ipynb notebook.
Getting variable size error while running Coronagraph_Basic.ipynb notebook.
Sep 12, 2024
Description
I am getting some error while running the Coronagraph_Basic.ipynb notebook. Specifically at cell 14 of the notebook, where obs.gen_roll_image() is called. It seems like there is an array size mismatch while adding some images.
What I Did
the parameter,
fov_pix,
is set to 321 in the notebook, I changed it to 320 to be consistent withwind_mode
value. I don’t get any error and I am able to generate some contrast plots that looks nearly same as shown in the remote notebooks.The text was updated successfully, but these errors were encountered: