You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This compares the Hubble Space Telescope (HST) and JWST (NIRCam infrared camera) images. It does not look very exciting. But on the right we see the meat of today's demonstration - this shows the location of _spectroscopic slits_. You can think of these are a series of slices through the galaxy where the light is dispersed to make a spectrum. (More info on [how a long-slit spectrograph works](https://en.wikipedia.org/wiki/Long-slit_spectroscopy)).
@@ -60,7 +60,7 @@ OK let's make a plot:
60
60
61
61
You can see from the output this is a 2D image of dimensions 435x31 and here is what it looks like:
The horizontal bright trace down the middle is the spectrum of the galaxy. (The sharp cutoff on the left is due to the extreme redshift of the galaxy as we will see below, so is a genuine astrophysical effect and not an artefact). The dark bands either side are negative traces which _are_ an artefact of the data reduction pipeline, specifically "sky subtraction via nodding the telescope". These should be ignored.
66
66
@@ -84,7 +84,7 @@ We need to only extract the central few rows. Code like
84
84
85
85
This code generates a 31 element gaussian function along the slit axis. Here is what `$gaussian` looks like:
(It does not look smooth as it is evaluated on a coarse pixel grid and is only a few pixels wide). If we can extract along the slit weighting by this gaussian we can get two things for the price of one: (1) eliminate the signal from the dark artefacts and (2) _optimally_ weight the spectrum according to its light distribution along the slit (this arises from the shape of the galaxy) to get the most signal:noise.
90
90
@@ -102,7 +102,7 @@ It is also extremely fast as it operates at speeds close to what would happen if
102
102
When using it, I tend to need to experiment a bit to achieve what I want and look at the resulting dimensions.
103
103
The main rule to remember is dimensions need to _match_, this happens when they are either the same size, or when one of them is of size unity.
104
104
In the latter case the 'broadcasting' happens and you can think of it as growing the axis by repetition.
105
-
This all happens in the PDL internals during the operation it is being applied to, and the ndarray does not actually get any bigger nor use more memory! The same goes for dimension manipulation with functions like `clump()` and `t()`, the ndarray is not copied it is simply 'viewed differently'.
105
+
This all happens in the PDL internals during the operation it is being applied to, and the ndarray does not actually get any bigger nor use more memory! The same goes for dimension manipulation with functions like `t()`, the ndarray is not copied it is simply 'viewed differently'.
106
106
For switching other dimensions, [mv()](https://metacpan.org/pod/PDL::Slices#mv) and [xchg()](https://metacpan.org/pod/PDL::Slices#xchg).
107
107
108
108
More info on broadcasting and its rules is given in the pod [PDL::Broadcasting](https://metacpan.org/dist/PDL/view/Basic/Pod/Broadcasting.pod).
@@ -132,7 +132,7 @@ We can now look at our resulting spectrum:
132
132
}
133
133
134
134
This code adds the wavelength calibration of the axis (which is complex and beyond the scope of this article) and makes a plot, adding labels for the location of some common spectral lines [OK I had to write a trivial loop for this :-(]. Here is the plot:
What we see is a spectrum running from wavelengths 1 to 5 micrometers - this is beyond the range that the human eye can see because JWST is an infrared telescope. Looking at the spectral transitions there are two notable astrophysical features:
0 commit comments