Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scopesim/optics/fov_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ def extract_area_from_table(table, fov_volume):
fov_xs = (fov_volume["xs"] * fov_unit).to(table["x"].unit)
fov_ys = (fov_volume["ys"] * fov_unit).to(table["y"].unit)

mask = ((table["x"].data >= fov_xs[0].round(12).value) *
(table["x"].data <= fov_xs[1].round(12).value) *
(table["y"].data >= fov_ys[0].round(12).value) *
(table["y"].data <= fov_ys[1].round(12).value))
mask = ((table["x"].data >= fov_xs[0].value) *
(table["x"].data < fov_xs[1].value) *
(table["y"].data >= fov_ys[0].value) *
(table["y"].data < fov_ys[1].value))
table_new = table[mask]

return table_new
Expand Down
2 changes: 1 addition & 1 deletion scopesim/tests/mocks/py_objects/source_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _table_source():
lookup_table=np.linspace(0, 4, n)[::-1] * unit)]
tbl = Table(names=["x", "y", "ref", "weight"],
data=[[5, 0, -5, 0]*u.arcsec,
[5, -10, 5, 0] * u.arcsec,
[5, -9, 5, 0] * u.arcsec,
[2, 0, 1, 0],
[1, 1, 1, 2]])
tbl_source = Source(table=tbl, spectra=specs)
Expand Down