diff --git a/architect/systems/optical/spectrometers.py b/architect/systems/optical/spectrometers.py
index f3fb0d1..45ca9be 100644
--- a/architect/systems/optical/spectrometers.py
+++ b/architect/systems/optical/spectrometers.py
@@ -206,19 +206,31 @@ def get_iFOV(self):
return iFOV
- def get_sensor_spatial_resolution(self, target_distance):
+ def get_sensor_spatial_resolution(self, target_distance, skew_angle):
"""Get the sensor-limited spatial resolution.
- Ref: https://www.notion.so/utat-ss/Sensor-Limited-Spectral-Resolution-5071f076997f4b59851f73127822fb23
+ Ref: https://www.notion.so/utat-ss/Sensor-Limited-Spatial-Resolution-e009528833ec4aebba532476aab15bef
"""
assert self.sensor is not None, "A sensor component must be specified."
assert self.foreoptic is not None, "A foreoptic component must be specified."
spatial_resolution = (
- target_distance
- * self.sensor.get_pitch()
- / self.foreoptic.get_focal_length()
+ (
+ target_distance
+ * self.sensor.get_pitch()
+ / self.foreoptic.get_focal_length()
+ )
+ * np.power(
+ np.cos(np.arctan((19 * unit.mm) / (self.foreoptic.focal_length))), 2
+ )
+ / np.power(
+ np.cos(
+ np.arctan((19 * unit.mm) / (self.foreoptic.focal_length))
+ + skew_angle
+ ),
+ 2,
+ )
)
return spatial_resolution
@@ -268,7 +280,8 @@ def get_spatial_resolution(self, wavelength, target_distance, skew_angle=0):
spatial_resolution = self.spatial_resolution
else:
sensor_spatial_resolution = self.get_sensor_spatial_resolution(
- target_distance=target_distance
+ target_distance=target_distance,
+ skew_angle=skew_angle,
)
optical_spatial_resolution = self.get_optical_spatial_resolution(
diff --git a/tradebooks/spatial_resolution_&_swath_vs_focal_length_trade.ipynb b/tradebooks/spatial_resolution_&_swath_vs_focal_length_trade.ipynb
index fc956d4..136ccab 100644
--- a/tradebooks/spatial_resolution_&_swath_vs_focal_length_trade.ipynb
+++ b/tradebooks/spatial_resolution_&_swath_vs_focal_length_trade.ipynb
@@ -10,7 +10,7 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
@@ -26,7 +26,8 @@
"\n",
"# project\n",
"from architect import components, systems\n",
- "from architect.libs import utillib"
+ "from architect.libs import utillib\n",
+ "from architect.systems.optical import foreoptics, masks, sensors, spectrometers"
]
},
{
@@ -38,7 +39,7 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
@@ -55,14 +56,14 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"# constants\n",
"orbital_altitude = 550 * unit.km\n",
"foreoptic_diameter = 44 * unit.mm\n",
- "skew_angle = np.array([0, 0]) * unit.deg\n",
+ "skew_angle = np.array([40, 40]) * unit.deg\n",
"slit_size = np.array([3, 1]) * unit.mm\n",
"target_wavelength = 1300 * unit.nm\n",
"\n",
@@ -85,21 +86,19 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"# components\n",
- "sensor = components.sensors.TauSWIR()\n",
+ "sensor = sensors.TauSWIR()\n",
"\n",
- "foreoptic = components.foreoptics.Foreoptic(\n",
- " diameter=foreoptic_diameter, focal_length=focal_length\n",
- ")\n",
+ "foreoptic = foreoptics.Foreoptic(diameter=foreoptic_diameter, focal_length=focal_length)\n",
"\n",
- "slit = components.masks.RectSlit(size=slit_size)\n",
+ "slit = masks.RectSlit(size=slit_size)\n",
"\n",
"# systems\n",
- "payload = systems.spectrometers.HyperspectralImager(\n",
+ "payload = spectrometers.HyperspectralImager(\n",
" sensor=sensor, foreoptic=foreoptic, slit=slit\n",
")"
]
@@ -113,7 +112,7 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 11,
"metadata": {},
"outputs": [
{
@@ -125,13 +124,6 @@
"metadata": {},
"output_type": "display_data"
},
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity]\n"
- ]
- },
{
"data": {
"text/plain": [
@@ -166,7 +158,7 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 12,
"metadata": {},
"outputs": [
{
@@ -227,10 +219,10 @@
825,
412.5,
275,
- 206.25,
+ 206.25000000000003,
165,
137.5,
- 117.85714285714286,
+ 117.85714285714285,
103.125,
91.66666666666667,
82.5,
@@ -304,35 +296,35 @@
],
"xaxis": "x",
"y": [
- 165,
- 82.5,
- 55,
- 41.25,
- 33,
- 27.5,
- 23.571428571428573,
- 20.625,
- 18.333333333333332,
- 16.5,
- 15,
- 13.75,
- 12.692307692307695,
- 11.785714285714286,
- 11,
- 10.3125,
- 9.705882352941176,
- 9.166666666666666,
- 8.68421052631579,
- 8.25,
- 7.857142857142858,
- 7.5,
- 7.173913043478261,
- 6.875,
- 6.6000000000000005,
- 6.346153846153847,
- 6.111111111111112,
- 5.892857142857143,
- 5.689655172413793
+ 285.70061619776493,
+ 141.1462850689137,
+ 93.89011781532486,
+ 70.36330628005588,
+ 56.27056780244468,
+ 46.88305638262524,
+ 40.18078375507527,
+ 35.155521021675966,
+ 31.247728268120113,
+ 28.121910220791985,
+ 25.564669932567096,
+ 23.433790666712913,
+ 21.630839320719623,
+ 20.08551997856522,
+ 18.746290005602123,
+ 17.574497028345448,
+ 16.540586199236163,
+ 15.621572234865333,
+ 14.799310053611386,
+ 14.059284393501786,
+ 13.389745356226035,
+ 12.781079775097087,
+ 12.225346613899617,
+ 11.715928541808495,
+ 11.247267147323376,
+ 10.814659268094285,
+ 10.414098588584181,
+ 10.042151186498366,
+ 9.695856832041544
],
"yaxis": "y"
},
@@ -384,35 +376,35 @@
],
"xaxis": "x",
"y": [
- 55,
- 27.5,
- 18.333333333333332,
- 13.75,
- 11,
- 9.166666666666666,
- 7.857142857142858,
- 6.875,
- 6.111111111111112,
- 5.5,
- 5,
- 4.583333333333333,
- 4.230769230769231,
- 3.9285714285714284,
- 3.666666666666667,
- 3.4375,
- 3.235294117647059,
- 3.055555555555556,
- 2.8947368421052633,
- 2.75,
- 2.619047619047619,
- 2.5,
- 2.391304347826087,
- 2.2916666666666665,
- 2.2,
- 2.1153846153846154,
- 2.037037037037037,
- 1.9642857142857142,
- 1.896551724137931
+ 93.89011781532486,
+ 46.88305638262524,
+ 31.247728268120113,
+ 23.433790666712913,
+ 18.746290005602123,
+ 15.621572234865333,
+ 13.389745356226035,
+ 11.715928541808495,
+ 10.414098588584181,
+ 9.372650030035306,
+ 8.520564906224399,
+ 7.810499682563171,
+ 7.209678977630207,
+ 6.694692302227945,
+ 6.248372249432394,
+ 5.85784343442497,
+ 5.513260080198706,
+ 5.206964427582683,
+ 4.932910921466954,
+ 4.686263147506003,
+ 4.463105933568773,
+ 4.260235971312398,
+ 4.0750070596952455,
+ 3.9052140385642753,
+ 3.749004578811493,
+ 3.6048113290717385,
+ 3.471299141219503,
+ 3.3473236048877695,
+ 3.2318981611951014
],
"yaxis": "y"
}
@@ -1310,204 +1302,204 @@
"
0 | \n",
" 10.0 | \n",
" 825.000000 | \n",
- " 165.000000 | \n",
- " 55.000000 | \n",
+ " 285.700616 | \n",
+ " 93.890118 | \n",
" \n",
" \n",
" 1 | \n",
" 20.0 | \n",
" 412.500000 | \n",
- " 82.500000 | \n",
- " 27.500000 | \n",
+ " 141.146285 | \n",
+ " 46.883056 | \n",
"
\n",
" \n",
" 2 | \n",
" 30.0 | \n",
" 275.000000 | \n",
- " 55.000000 | \n",
- " 18.333333 | \n",
+ " 93.890118 | \n",
+ " 31.247728 | \n",
"
\n",
" \n",
" 3 | \n",
" 40.0 | \n",
" 206.250000 | \n",
- " 41.250000 | \n",
- " 13.750000 | \n",
+ " 70.363306 | \n",
+ " 23.433791 | \n",
"
\n",
" \n",
" 4 | \n",
" 50.0 | \n",
" 165.000000 | \n",
- " 33.000000 | \n",
- " 11.000000 | \n",
+ " 56.270568 | \n",
+ " 18.746290 | \n",
"
\n",
" \n",
" 5 | \n",
" 60.0 | \n",
" 137.500000 | \n",
- " 27.500000 | \n",
- " 9.166667 | \n",
+ " 46.883056 | \n",
+ " 15.621572 | \n",
"
\n",
" \n",
" 6 | \n",
" 70.0 | \n",
" 117.857143 | \n",
- " 23.571429 | \n",
- " 7.857143 | \n",
+ " 40.180784 | \n",
+ " 13.389745 | \n",
"
\n",
" \n",
" 7 | \n",
" 80.0 | \n",
" 103.125000 | \n",
- " 20.625000 | \n",
- " 6.875000 | \n",
+ " 35.155521 | \n",
+ " 11.715929 | \n",
"
\n",
" \n",
" 8 | \n",
" 90.0 | \n",
" 91.666667 | \n",
- " 18.333333 | \n",
- " 6.111111 | \n",
+ " 31.247728 | \n",
+ " 10.414099 | \n",
"
\n",
" \n",
" 9 | \n",
" 100.0 | \n",
" 82.500000 | \n",
- " 16.500000 | \n",
- " 5.500000 | \n",
+ " 28.121910 | \n",
+ " 9.372650 | \n",
"
\n",
" \n",
" 10 | \n",
" 110.0 | \n",
" 75.000000 | \n",
- " 15.000000 | \n",
- " 5.000000 | \n",
+ " 25.564670 | \n",
+ " 8.520565 | \n",
"
\n",
" \n",
" 11 | \n",
" 120.0 | \n",
" 68.750000 | \n",
- " 13.750000 | \n",
- " 4.583333 | \n",
+ " 23.433791 | \n",
+ " 7.810500 | \n",
"
\n",
" \n",
" 12 | \n",
" 130.0 | \n",
" 63.461538 | \n",
- " 12.692308 | \n",
- " 4.230769 | \n",
+ " 21.630839 | \n",
+ " 7.209679 | \n",
"
\n",
" \n",
" 13 | \n",
" 140.0 | \n",
" 58.928571 | \n",
- " 11.785714 | \n",
- " 3.928571 | \n",
+ " 20.085520 | \n",
+ " 6.694692 | \n",
"
\n",
" \n",
" 14 | \n",
" 150.0 | \n",
" 55.000000 | \n",
- " 11.000000 | \n",
- " 3.666667 | \n",
+ " 18.746290 | \n",
+ " 6.248372 | \n",
"
\n",
" \n",
" 15 | \n",
" 160.0 | \n",
" 51.562500 | \n",
- " 10.312500 | \n",
- " 3.437500 | \n",
+ " 17.574497 | \n",
+ " 5.857843 | \n",
"
\n",
" \n",
" 16 | \n",
" 170.0 | \n",
" 48.529412 | \n",
- " 9.705882 | \n",
- " 3.235294 | \n",
+ " 16.540586 | \n",
+ " 5.513260 | \n",
"
\n",
" \n",
" 17 | \n",
" 180.0 | \n",
" 45.833333 | \n",
- " 9.166667 | \n",
- " 3.055556 | \n",
+ " 15.621572 | \n",
+ " 5.206964 | \n",
"
\n",
" \n",
" 18 | \n",
" 190.0 | \n",
" 43.421053 | \n",
- " 8.684211 | \n",
- " 2.894737 | \n",
+ " 14.799310 | \n",
+ " 4.932911 | \n",
"
\n",
" \n",
" 19 | \n",
" 200.0 | \n",
" 41.250000 | \n",
- " 8.250000 | \n",
- " 2.750000 | \n",
+ " 14.059284 | \n",
+ " 4.686263 | \n",
"
\n",
" \n",
" 20 | \n",
" 210.0 | \n",
" 39.285714 | \n",
- " 7.857143 | \n",
- " 2.619048 | \n",
+ " 13.389745 | \n",
+ " 4.463106 | \n",
"
\n",
" \n",
" 21 | \n",
" 220.0 | \n",
" 37.500000 | \n",
- " 7.500000 | \n",
- " 2.500000 | \n",
+ " 12.781080 | \n",
+ " 4.260236 | \n",
"
\n",
" \n",
" 22 | \n",
" 230.0 | \n",
" 35.869565 | \n",
- " 7.173913 | \n",
- " 2.391304 | \n",
+ " 12.225347 | \n",
+ " 4.075007 | \n",
"
\n",
" \n",
" 23 | \n",
" 240.0 | \n",
" 34.375000 | \n",
- " 6.875000 | \n",
- " 2.291667 | \n",
+ " 11.715929 | \n",
+ " 3.905214 | \n",
"
\n",
" \n",
" 24 | \n",
" 250.0 | \n",
" 33.000000 | \n",
- " 6.600000 | \n",
- " 2.200000 | \n",
+ " 11.247267 | \n",
+ " 3.749005 | \n",
"
\n",
" \n",
" 25 | \n",
" 260.0 | \n",
" 31.730769 | \n",
- " 6.346154 | \n",
- " 2.115385 | \n",
+ " 10.814659 | \n",
+ " 3.604811 | \n",
"
\n",
" \n",
" 26 | \n",
" 270.0 | \n",
" 30.555556 | \n",
- " 6.111111 | \n",
- " 2.037037 | \n",
+ " 10.414099 | \n",
+ " 3.471299 | \n",
"
\n",
" \n",
" 27 | \n",
" 280.0 | \n",
" 29.464286 | \n",
- " 5.892857 | \n",
- " 1.964286 | \n",
+ " 10.042151 | \n",
+ " 3.347324 | \n",
"
\n",
" \n",
" 28 | \n",
" 290.0 | \n",
" 28.448276 | \n",
- " 5.689655 | \n",
- " 1.896552 | \n",
+ " 9.695857 | \n",
+ " 3.231898 | \n",
"
\n",
" \n",
"\n",
@@ -1515,66 +1507,66 @@
],
"text/plain": [
" Focal Length [mm] Spatial Resolution [m] Swath (across-track) [km] \\\n",
- "0 10.0 825.000000 165.000000 \n",
- "1 20.0 412.500000 82.500000 \n",
- "2 30.0 275.000000 55.000000 \n",
- "3 40.0 206.250000 41.250000 \n",
- "4 50.0 165.000000 33.000000 \n",
- "5 60.0 137.500000 27.500000 \n",
- "6 70.0 117.857143 23.571429 \n",
- "7 80.0 103.125000 20.625000 \n",
- "8 90.0 91.666667 18.333333 \n",
- "9 100.0 82.500000 16.500000 \n",
- "10 110.0 75.000000 15.000000 \n",
- "11 120.0 68.750000 13.750000 \n",
- "12 130.0 63.461538 12.692308 \n",
- "13 140.0 58.928571 11.785714 \n",
- "14 150.0 55.000000 11.000000 \n",
- "15 160.0 51.562500 10.312500 \n",
- "16 170.0 48.529412 9.705882 \n",
- "17 180.0 45.833333 9.166667 \n",
- "18 190.0 43.421053 8.684211 \n",
- "19 200.0 41.250000 8.250000 \n",
- "20 210.0 39.285714 7.857143 \n",
- "21 220.0 37.500000 7.500000 \n",
- "22 230.0 35.869565 7.173913 \n",
- "23 240.0 34.375000 6.875000 \n",
- "24 250.0 33.000000 6.600000 \n",
- "25 260.0 31.730769 6.346154 \n",
- "26 270.0 30.555556 6.111111 \n",
- "27 280.0 29.464286 5.892857 \n",
- "28 290.0 28.448276 5.689655 \n",
+ "0 10.0 825.000000 285.700616 \n",
+ "1 20.0 412.500000 141.146285 \n",
+ "2 30.0 275.000000 93.890118 \n",
+ "3 40.0 206.250000 70.363306 \n",
+ "4 50.0 165.000000 56.270568 \n",
+ "5 60.0 137.500000 46.883056 \n",
+ "6 70.0 117.857143 40.180784 \n",
+ "7 80.0 103.125000 35.155521 \n",
+ "8 90.0 91.666667 31.247728 \n",
+ "9 100.0 82.500000 28.121910 \n",
+ "10 110.0 75.000000 25.564670 \n",
+ "11 120.0 68.750000 23.433791 \n",
+ "12 130.0 63.461538 21.630839 \n",
+ "13 140.0 58.928571 20.085520 \n",
+ "14 150.0 55.000000 18.746290 \n",
+ "15 160.0 51.562500 17.574497 \n",
+ "16 170.0 48.529412 16.540586 \n",
+ "17 180.0 45.833333 15.621572 \n",
+ "18 190.0 43.421053 14.799310 \n",
+ "19 200.0 41.250000 14.059284 \n",
+ "20 210.0 39.285714 13.389745 \n",
+ "21 220.0 37.500000 12.781080 \n",
+ "22 230.0 35.869565 12.225347 \n",
+ "23 240.0 34.375000 11.715929 \n",
+ "24 250.0 33.000000 11.247267 \n",
+ "25 260.0 31.730769 10.814659 \n",
+ "26 270.0 30.555556 10.414099 \n",
+ "27 280.0 29.464286 10.042151 \n",
+ "28 290.0 28.448276 9.695857 \n",
"\n",
" Swath (along-track) [km] \n",
- "0 55.000000 \n",
- "1 27.500000 \n",
- "2 18.333333 \n",
- "3 13.750000 \n",
- "4 11.000000 \n",
- "5 9.166667 \n",
- "6 7.857143 \n",
- "7 6.875000 \n",
- "8 6.111111 \n",
- "9 5.500000 \n",
- "10 5.000000 \n",
- "11 4.583333 \n",
- "12 4.230769 \n",
- "13 3.928571 \n",
- "14 3.666667 \n",
- "15 3.437500 \n",
- "16 3.235294 \n",
- "17 3.055556 \n",
- "18 2.894737 \n",
- "19 2.750000 \n",
- "20 2.619048 \n",
- "21 2.500000 \n",
- "22 2.391304 \n",
- "23 2.291667 \n",
- "24 2.200000 \n",
- "25 2.115385 \n",
- "26 2.037037 \n",
- "27 1.964286 \n",
- "28 1.896552 "
+ "0 93.890118 \n",
+ "1 46.883056 \n",
+ "2 31.247728 \n",
+ "3 23.433791 \n",
+ "4 18.746290 \n",
+ "5 15.621572 \n",
+ "6 13.389745 \n",
+ "7 11.715929 \n",
+ "8 10.414099 \n",
+ "9 9.372650 \n",
+ "10 8.520565 \n",
+ "11 7.810500 \n",
+ "12 7.209679 \n",
+ "13 6.694692 \n",
+ "14 6.248372 \n",
+ "15 5.857843 \n",
+ "16 5.513260 \n",
+ "17 5.206964 \n",
+ "18 4.932911 \n",
+ "19 4.686263 \n",
+ "20 4.463106 \n",
+ "21 4.260236 \n",
+ "22 4.075007 \n",
+ "23 3.905214 \n",
+ "24 3.749005 \n",
+ "25 3.604811 \n",
+ "26 3.471299 \n",
+ "27 3.347324 \n",
+ "28 3.231898 "
]
},
"metadata": {},
@@ -1614,15 +1606,50 @@
" None | \n",
" \n",
" \n",
- " components | \n",
+ " systems | \n",
" list [4] | \n",
" None | \n",
"
\n",
+ " \n",
+ " dimensions | \n",
+ " None | \n",
+ " None | \n",
+ "
\n",
+ " \n",
+ " mass | \n",
+ " None | \n",
+ " None | \n",
+ "
\n",
+ " \n",
+ " volume | \n",
+ " None | \n",
+ " None | \n",
+ "
\n",
+ " \n",
+ " density | \n",
+ " None | \n",
+ " None | \n",
+ "
\n",
+ " \n",
+ " index | \n",
+ " None | \n",
+ " None | \n",
+ "
\n",
+ " \n",
+ " transmittance | \n",
+ " None | \n",
+ " None | \n",
+ "
\n",
+ " \n",
+ " spatial_resolution | \n",
+ " None | \n",
+ " None | \n",
+ "
\n",
" \n",
""
],
"text/plain": [
- ""
+ ""
]
},
"metadata": {},
@@ -1657,11 +1684,6 @@
" title=None,\n",
" dark=True,\n",
")\n",
- "df.to_csv(output_dir / \"data.csv\", index=False)\n",
- "plot.save(\n",
- " fig=fig, name=\"spatial_resolution_&_swath_vs_focal_length_trade\", path=output_dir\n",
- ")\n",
- "\n",
"\n",
"fig.show()\n",
"display(df)\n",
@@ -1671,7 +1693,7 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3.10.7 ('.venv': poetry)",
+ "display_name": ".venv",
"language": "python",
"name": "python3"
},
@@ -1685,12 +1707,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.7"
+ "version": "3.10.4"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
- "hash": "c4b485a9dc540be4f5d287e4eb00fc79125e03014bfc694222ba78c2b10f3405"
+ "hash": "ea94d1563ba72b5e193eb78e1e2e2e544545c1141b798a67bf34f1cf62a0fed5"
}
}
},