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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 32
swap-size-gb: 48

- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Below is an example of one image captured during the 2019 flight.
)
ax.text(
x=0.01,
y=0.98,
y=0.05,
s=a.channel.ndarray,
transform=ax.transAxes,
ha="left",
Expand All @@ -60,7 +60,7 @@ Below is an example of one image captured during the 2019 flight.
)
ax.text(
x=.99,
y=0.98,
y=0.05,
s=a.inputs.time.ndarray,
transform=ax.transAxes,
ha="right",
Expand Down
80 changes: 63 additions & 17 deletions docs/reports/level-1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -444,18 +444,22 @@
]
},
{
"metadata": {},
"cell_type": "code",
"source": "darks = electrons.darks.despiked",
"id": "7b482a566ba8ae28",
"metadata": {},
"source": [
"darks = electrons.darks.despiked"
],
"outputs": [],
"execution_count": null
},
{
"metadata": {},
"cell_type": "code",
"source": "dark = darks.mean(darks.axis_time)",
"id": "1667176b2b7fa5e2",
"metadata": {},
"source": [
"dark = darks.mean(darks.axis_time)"
],
"outputs": [],
"execution_count": null
},
Expand All @@ -472,9 +476,7 @@
{
"cell_type": "code",
"id": "e02eff69",
"metadata": {
"scrolled": false
},
"metadata": {},
"source": [
"fig, ax = na.plt.subplots(\n",
" axis_rows=axis_channel,\n",
Expand Down Expand Up @@ -574,12 +576,10 @@
{
"cell_type": "code",
"id": "94c2f8c1",
"metadata": {
"scrolled": false
},
"metadata": {},
"source": [
"hist = na.histogram(\n",
" residual.taps.outputs, \n",
" residual.taps.outputs,\n",
" axis=axis_txy,\n",
" bins=dict(values=51),\n",
" min=-20 * u.electron,\n",
Expand Down Expand Up @@ -765,7 +765,12 @@
"cell_type": "raw",
"id": "9d4a66db",
"metadata": {
"raw_mimetype": "text/restructuredtext"
"editable": true,
"raw_mimetype": "text/restructuredtext",
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"Compute the `Pearson correlation coefficient <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_\n",
Expand All @@ -786,7 +791,13 @@
{
"cell_type": "code",
"id": "51302e0b",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"scipy.stats.pearsonr(\n",
" x=where_spike.ndarray,\n",
Expand All @@ -801,18 +812,53 @@
"cell_type": "raw",
"id": "1cda4f3f",
"metadata": {
"raw_mimetype": "text/restructuredtext"
"editable": true,
"raw_mimetype": "",
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"As we can see, the spikes are slightly correlated with the image.\n",
"This means that there are some small fraction of pixels wrongly identified as spikes."
]
},
{
"cell_type": "raw",
"id": "88c64473-2a29-4e51-8fc7-f68f444fe19c",
"metadata": {
"editable": true,
"raw_mimetype": "text/x-rst",
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"To match oberservations, we need to undo an electronic flip of the image incident on the ESIS CCDs about the `detector_y` axis."
]
},
{
"cell_type": "code",
"id": "b05a4b3e849e0451",
"metadata": {},
"source": [
"flipped_outputs = despiked.outputs[dict(detector_y=slice(None, None, -1))]"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "raw",
"id": "5e090187",
"metadata": {
"raw_mimetype": "text/restructuredtext"
"editable": true,
"raw_mimetype": "text/restructuredtext",
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"The last thing to do is to convert the output to an instance of :class:`esis.data.Level_1`.\n",
Expand All @@ -826,7 +872,7 @@
"source": [
"level_1 = esis.data.Level_1(\n",
" inputs=despiked.inputs,\n",
" outputs=despiked.outputs,\n",
" outputs=flipped_outputs,\n",
" axis_time=axis_time,\n",
" axis_channel=axis_channel,\n",
" axis_x=axis_x,\n",
Expand Down Expand Up @@ -874,7 +920,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.1"
"version": "3.12.12"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion esis/data/_level_1/_level_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def from_level_0(

return cls(
inputs=a.inputs,
outputs=a.outputs,
outputs=a.outputs[dict(detector_y=slice(None, None, -1))],
instrument=instrument,
axis_time=a.axis_time,
axis_channel=a.axis_channel,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies = [
"ipython",
"numpy",
"matplotlib",
"astropy@git+https://github.com/astropy/astropy.git",
"astropy~=7.2",
"joblib",
"optika>=0.13.0",
"msfc-ccd>=0.6.0",
Expand Down