Skip to content

Commit

Permalink
Update sensors.py
Browse files Browse the repository at this point in the history
added def get_datacube_size(self): """Get the size of datacube in bit."""
  • Loading branch information
chenghymichael committed Mar 6, 2024
1 parent 4d6423e commit 2ec7f7a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions architect/systems/optical/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ def get_waveband(self) -> Quantity[unit.m]:
return self.waveband
else:
raise ValueError("Waveband is not set.")

def get_datacube_size(self):
"""Get the size of datacube in bit."""

npxx = self.n_px[0] # 640 px, pixels on the sensor in the across-track direction -> spatial information
npxy = self.n_px[1] # 512 px, pixels on the sensor in the along-track direction -> spectral information
nbit = self.n_bit # bit depth
D = npxx * npxx * npxy * nbit
return D


class TauSWIR(Sensor):
Expand Down

0 comments on commit 2ec7f7a

Please sign in to comment.