We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cube.get_tpf()
IndexError
frame_range
calculate_poscorr=False
An IndexError is raised from cube.get_tpf() when frame_range is specified and calculate_poscorr=False
Workaround: setcalculate_poscorr=True
calculate_poscorr=True
Example:
%%time from astropy.coordinates.sky_coordinate import SkyCoord import astropy.units as u import numpy as np from tesscube import TESSCube # TIC 400621146, sector 45 ra, dec = 95.954934, 31.679387 sector, camera, ccd = 45, 1, 2 coord = SkyCoord(ra * u.deg, dec *u.deg, frame="icrs") cube = TESSCube(sector=sector, camera=camera, ccd=ccd) # get only 1 good quality frame frame_day3 = np.where((cube.time > cube.time[0] + 3) & (cube.quality == 0))[0][0] hdul = cube.get_tpf(coord, shape=(11, 11), frame_range=(frame_day3, frame_day3 + 1), calculate_poscorr=False) hdul
The error and the stack trace.
C:\dev\tesscube\src\tesscube\query.py:52: RuntimeWarning: overflow encountered in scalar multiply pixel_offset = (column - 1) * self.nframes * self.nsets + ( --------------------------------------------------------------------------- IndexError Traceback (most recent call last) File <timed exec>:18 File C:\dev\tesscube\src\tesscube\cube.py:296, in TESSCube.get_tpf(self, target, shape, frame_range, frame_bin, calculate_poscorr) 288 else: 289 k = np.ones(len(self), bool) 291 time, timecorr, cadenceno, quality, pos_corr1, pos_corr2 = ( 292 self.time[k], 293 self.timecorr[k], 294 self.cadence_number[k], 295 self.quality[k], --> 296 pos_corr1[k], 297 pos_corr2[k], 298 ) 300 if frame_bin > 1: 301 idxs = np.hstack( 302 [ 303 r[: frame_bin * np.floor(len(r) / frame_bin).astype(int)] (...) 307 ] 308 ) IndexError: boolean index did not match indexed array along dimension 0; dimension is 1 but corresponding boolean dimension is 3450
Version: 1.0.2dev0 Platform: Windows 11
The text was updated successfully, but these errors were encountered:
christinahedges
No branches or pull requests
An
IndexError
is raised fromcube.get_tpf()
whenframe_range
is specified andcalculate_poscorr=False
Workaround: set
calculate_poscorr=True
Example:
The error and the stack trace.
Version: 1.0.2dev0
Platform: Windows 11
The text was updated successfully, but these errors were encountered: