Week 4: Laugh Now Cry Later (feat. Lil Durk)
March 21, 2024
This week I laughed. Next week I will cry. Simulations take so long.
The past couple weeks, I worked on generating simulations of exoplanet Trappist-1e’s appearance with and without clouds. Since I succeeded simulating Trappist-1e’s atmosphere without clouds, I took a break from simulations to write code to graph Spectral Radiance vs. Wavelength for Trappist-1e’s simulation generated data.
Spectral radiance is the amount of light (electromagnetic radiation) emitted or reflected by a surface per unit area, per unit wavelength, per unit solid angle. The units of spectral radiance is [W/m^2/nm/sr]. For the simulation, spectral radiance depends on the size of the FOV (field of view) and the projected size of the planet in it.
There were many challenges on this journey. The wavelength range needed to generate meaningful simulations was: 300-20000 nm. With such a large range the simulations took a lot more time than before. I can only imagine how long each simulation will take when I add in clouds to modelling parameters.
Second, the units. Bytes of data must be properly matched to a color to fill the correct pixel. For this, the simulated units must be correct as well. Initially, I made the error of using 0.3-20 um instead of 300-20000 nm, which is the same range, but the different unit conversion threw off the program. This left me with an oddly colored and mismatched image shown below. As you can see, I used a lower resolution to simulate faster.
Once that was fixed, the main course dish on my erroneous platter was dealing with the number of wavelength points. This is an important parameter to ensure the simulations map the correct information to the correct pixels. This particular problem was exasperating because it was a relatively quick fix that took me so long to understand. Because of this problem, my graphs and images were inaccurate. Unfortunately, I thought it was a problem with the data itself, so I kept regenerating byte files that held correct information, which was a lengthy process. Thankfully, I solved that problem. From next week onwards, I’ll be making this software more usable for applications besides Trappist-1e. The first step for that is to make a function that tells me the number of wavelength points (instead of a user having to deep dive into the data to find it themselves). Below is my final spectra:
Now take a nice, long look at the graph image, and spot the mistake. First to comment the answer down below gets $10.
Tanvi Deshmukh
Leave a Reply
You must be logged in to post a comment.