Skip to content

Commit

Permalink
Merge pull request #170 from AstarVienna/fh/kwant
Browse files Browse the repository at this point in the history
Add Quantization effect to METIS detector yamls
  • Loading branch information
hugobuddel committed May 14, 2024
2 parents c6344a6 + 1bb0b2e commit cff00ef
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
6 changes: 6 additions & 0 deletions METIS/METIS_DET_IFU.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ effects:
kwargs:
noise_std: "!DET.readout_noise"
n_channels: 32

- name: quantization
description: Turn photon count into integers
class: Quantization
kwargs:
dtype: uint16
6 changes: 6 additions & 0 deletions METIS/METIS_DET_IMG_LM.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,9 @@ effects:
kwargs:
noise_std: "!DET.readout_noise"
n_channels: 32

- name: quantization
description: Turn photon count into integers
class: Quantization
kwargs:
dtype: uint16
6 changes: 6 additions & 0 deletions METIS/METIS_DET_IMG_N_Aquarius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,9 @@ effects:
chop_offsets: "!OBS.chop_offsets"
nod_offsets: "!OBS.nod_offsets"
pixel_scale: "!INST.pixel_scale"

- name: quantization
description: Turn photon count into integers
class: Quantization
kwargs:
dtype: uint16
6 changes: 6 additions & 0 deletions METIS/METIS_DET_IMG_N_GeoSnap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,9 @@ effects:
chop_offsets: "!OBS.chop_offsets"
nod_offsets: "!OBS.nod_offsets"
pixel_scale: "!INST.pixel_scale"

- name: quantization
description: Turn photon count into integers
class: Quantization
kwargs:
dtype: uint16
10 changes: 5 additions & 5 deletions METIS/docs/example_notebooks/demos/demo_auto_exposure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"outputs": [],
"source": [
"outimg = metis.readout()[0][1].data \n",
"outimg /= metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"outimg = outimg / metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"\n",
"full_well = metis.cmds[\"!DET.full_well\"]\n",
"print(\"\\nResult\\n======\")\n",
Expand All @@ -109,7 +109,7 @@
"outputs": [],
"source": [
"outimg = metis.readout(exptime = 1000)[0][1].data \n",
"outimg /= metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"outimg = outimg / metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"\n",
"full_well = metis.cmds[\"!DET.full_well\"]\n",
"print(\"\\nResult\\n======\")\n",
Expand Down Expand Up @@ -159,7 +159,7 @@
"outputs": [],
"source": [
"outimg = metis.readout()[0][1].data \n",
"outimg /= metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"outimg = outimg / metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"\n",
"full_well = metis.cmds[\"!DET.full_well\"]\n",
"print(\"\\nResult\\n======\")\n",
Expand Down Expand Up @@ -209,7 +209,7 @@
"outputs": [],
"source": [
"outimg = metis.readout(exptime=3600.)[0][1].data \n",
"outimg /= metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"outimg = outimg / metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"\n",
"full_well = metis.cmds[\"!DET.full_well\"]\n",
"\n",
Expand Down Expand Up @@ -270,7 +270,7 @@
"outputs": [],
"source": [
"outimg = metis.readout()[0][1].data\n",
"outimg /= metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"outimg = outimg / metis.cmds[metis['summed_exposure'].meta['ndit']]\n",
"\n",
"full_well = metis.cmds[\"!DET.full_well\"]\n",
"\n",
Expand Down

0 comments on commit cff00ef

Please sign in to comment.