happiness is pool noodles

We kicked the day of with a final round of wavelength image set additions to the Offline version of the STN. There really is nothing interesting about the process of adding wavelength sets, but the final product is well worth the bore of the chore. By 2:00 pm, we added one more single wavelength set, along with two additional wavelength composite image sets. The wavelength composite images are basically just single wavelength images “stacked” on top of each other to form one super image. Think of them like this:

latest_512_0211 + latest_512_0193 + latest_512_0171 = f_211_193_171_512

So now, the Offline version of the STN offers a total of 10 wavelength sets, and the Online version offers a total of 4 wavelength sets. This brings our grand total currently available to the user, to 14 wavelengths. For now, I think this should be enough.


We have also given up on waiting for the PVC piping that we ordered to come in. We were going to construct an improved stand for the giant 5-ft inflatable sphere to rest on. The problem with the old stand (which was just a PVC cube) was that even the slightest disturbance in the force would make it fall and roll/bounce away. It would probably even fall if you just stared at it for too long. The PVC piping that we ordered was probably lost in the void while being shipped, so we decided to take apart the old stand and redesign the stand.

We came up with the idea of utilizing the flexibility of pool noodles to “hug” the sphere in order decrease the sphere’s sensitivity to impact. After acquiring “The Almighty Credit Card,” we made a quick visit to Walmart and picked up two pool noodles on sale for $2 each. We then cut the pipes to a more useful length, and then after removing the top face of the PVC cube, we just stuck them onto the open legs. I’m terrible at describing things, so here’s a visual:

output_aCm5Oy

setting it up is as easy as it looks

And so the question is, “did it work?”

av6u0

I pushed as hard as humanly possible

Yup. There are also some side “benefits” to using the pool noodles, such as acting as packaging fillings in the suitcase. The pool noodles were cut to a length that not only would fit perfectly into the suitcase (to act as an effective filling), but also so that it would not interfere with the images projected onto the sphere. Also, the old cube design was difficult to assemble because it required tying a system of bungee cords inside the PVC pipes to hold the cube together.

Also the assembled cube definitely wouldn’t fit in the suitcase, so the user would end up having to having to do the not-very-fun assembling of the cube. The new design eliminated the need for the user to wrangle with bungee cords because we have already bungee’d the four base PVC pipes together and even when bungee’d, it will still fit in the suitcase. The four-piece base is just a flat (2D) face of a cube, so unlike an entire 3D cube, the pre-assembled base will fit fine in the suitcase. That wraps up another super productive Monday!

Advertisements

Preparing to Pass the Baton

We are now at that “exciting” stage of development that includes making sure that the potential users and future programmers who may adopt and add to the project, will understand how to set up and use what we have made.

This includes:

  • Going through our source code and commenting on how it works
  • Streamline and simplify the process of setup ( eg. Adding icons for straight forward launch)
  • Writing up instruction manuals on how to set things up
  • Record supplementary video tutorial
Aside from that, we are still adding more wavelength sets to the newly renamed STN. We have made this process very easy, so future project members should be able to add more wavelength sets if any more are available in the future. The only downside is that the process is pretty time consuming, but it is worth it because it only has to be done once for each new wavelength.
Other than that, the path ahead of us is not too meandering.

The Morning of Meetings

This morning was basically one long meeting with small intermissions. We started the day with a slightly extended intern meeting that included a progress update from all of the interns and I. Then, after returning to the lab for a few minutes, we got ready and left for the weekly Tuesday Insight Lab meeting. This week’s meeting, however, was a little bit different.

Apparently, the question of “who is in charge of the Insight Lab and REU students?” still has no full answer(?). I don’t really know what is going on, but the future of the Insight Lab is looking pretty non-existent. What I do know is that there will be lots of work to do in the last couple of weeks because the Insight Lab will be discontinued in the fall when classes start. Not only will we have to refine and polish our current projects, but it looks like we will have to revive a few older ones as well.

For the sake of finalization and the need to wrap things up, we have decided to rename the SuN (Sun Navigator) to STN (Sun Time-Lapse Navigator). Sun Navigator was a little too vague and general, and it did not suggest that the program has anything to do with the Sun’s history. With that decided (finally), we could now create a logo/icon for the project.

STN LiveSTN Offline

We still have a few finishing touches to make on the STN, namely just adding more wavelengths to the offline mode. After that, we’re revisiting the old projects.

No Internet? No Problem

Weekends are nice. Shelving a problem for a few days is sometimes the best way to solve the problem. After spending the weekend doing things other than working on the SuN project, I came in this morning feeling ready to tackle the problem of unavailable wavelengths.

As you know, we decided to include two different versions of the software in the final package. The first would be the SuN, which retrieves images live from the web, and the second would be the Offline Version, which directly grabs the images from a downloaded library. The SuN has basically reached its finally stages, and the Offline Version is already near completion as well.

Before today, the Offline Version did not exist at all. By the end of the day, we managed to get the Offline Version working beautifully. I created a modified version of the SuN program that instead of retrieving images from an online database, it retrieves images directly from the directories in the SuN laptop. This provides three main advantages over the live SuN version.

1. No need for an internet connection.

2. Loading the program takes very little time.

3. Because the program does not need to retrieve images by creating and using potentially broken URLs, we can grab wavelength sets whose URLs were too inconsistent for our program to generate reliably. Yes, this means that the SDO’s most visually appealing wavelength sets are now available to view in the SuN.

aoxz0

Of course being an offline and non-live version, there are a few downsides. Most prominently, the images shown are not the most recent and up to date. Also, storing potentially thousands of images in the laptop takes up a decent amount of memory space.

These problems however, are not very very problematic. As mentioned before, we do not intend for this program to be used for research purposes (although the live version may still be useful in that area). The offline version offers wavelengths unavailable in the live version that are still cool to look at and can still offer lots of information. The issue with taking up memory space really is not a big deal either. The 600 images that we have currently on the laptop take up around 120 megabytes of storage. I can’t imagine us filling up 1000 gigabyte (1,000,000 megabyte) hard drives with images of the SuN very easily.

Overall, I think we made the right decision by following solution B.


On a side note, Rajabk, Austin, and Nick also started to write the instruction manual and record the supplementary “how-to” video. Yay!

Grill Geniuses

Yesterday’s post was really helpful. It’s nice to get everything on your mind down onto (virtual) paper. I have made a decision to go wtih Solution B. For those of you who don’t know what Solution B is, I’ll quote it from yesterday’s blog right here: 

Solution B. The other solutions is somewhat of a semi-fix. We could simply download 100 images (days) of each of the currently unobtainable wavelengths, and load it directly into the browser. This means that the Sun under these wavelengths will never be updated, and the user can only view a time-lapse of the sun within a permanently fixed interval. After all, the purpose of this project is to create an educational tool, not so much of a research tool. A school teacher does not really need a “live” version of the Sun in order to point out certain features such as solar flares and sun spots to a class. Having a “live” projection of the Sun is a cool, but not terribly essential feature.

We could provide the functioning 5 wavelengths, but also have a separate mode that allows the users to view the other wavelengths that are not “live.” This does have some benefits too. Because the images will be downloaded onto the laptop, these wavelength sets of the Sun can be viewed without access to the internet. 

Because we have a limited time to work with, going with solution B is the safest and most reliable option. We are pretty much certain that Solution B will work, whereas Solution A carries great risks. If we pull off Solution B and have some time to spare, we can definitely give Solution A a shot, But if we start with Solution A and get stuck, we might have to scramble to implement Solution B.  

Today, Rory and I began the process of downloading 100 images of each wavelength set. While downloading, we rename them to YYYYMMDD_WAVE.jpg.

  • YYYY = year (eg 2014)
  • MM = month (eg, April = 04)
  • DD = day (eg, 01)
  • WAVE = wavelength (eg. 0131)

After downloading them, we will create an entirely separate html program called “SuNOfflineMode.” This html will function almost identically to the online version, but it will simply retrieve images directly from folders in the laptop instead of from the web. Coding this shouldn’t be too big of a problem, but since we’re re-coding, I might want to try optimize the process and make it a little more efficient. After examining and tracing the code of the online version, I feel like there are some possible shortcut alternatives. Anything to cut loading times is always welcome.

Speaking of loading times, I might want to add a loading bar to the SuN so that users won’t try to navigate the Sun time-lapse before all images are fully loaded. But again, this is just a “fun” feature and it is not very essential to the project.


On a completely different note, I learned how to grill today! David, Maryam, and I grilled for the barbecue today, and I think we did a pretty good job. We ate whatever we messed up. For example, while transporting the beef patties from the bag to the grill, I may have ripped it a bit and had to eat it later. But it still tasted fantastic; plus, who cares about what it looks like when it all looks the same in your stomach?  Also, here’s a pro tip for future grillers: be patient and flip as few times as possible ( preferably just once). 

Overall it was a fun experience, and I wouldn’t mind doing it again.

The Big Bad Headache

This blog has been a huge help for me. The reason why my posts are so long is because they are more of a thinking tool for me than they are a blog. When I write down my thoughts, things become a little clearer for me. This however, means that what I write takes a lot more effort for others to read, and it doesn’t make much sense to anyone but myself. In today’s post, I will try to provide a more comprehensible explanation of what i’m facing.

I may throw in some random bits that are just my thoughts and are not necessarily vital to the task at hand. If I do, they will look like this. Feel free to skip these.


 

The problem is that I do not know if there is a a way to test whether a or not a URL leads to a working image, before it is added to the array and then loaded in the browser. I’m not even sure where to start looking for answers because I’m not sure what to ask. Is this an issue of Computer Networking, Telnet, and Servers? Or is it something else?

Now, I mentioned before that solving this mystery would make a not-very-useful feature a possibility. That feature being, having a set number of images appear, irregardless of the number of images that fail to load. But that wouldn’t be the only feature that solving the mystery would bring to fruition. I realized that solving this problem would also enable us to add more wavelength sets. This would be huge because it would enable us to provide software updates to our users that include new content (new wavelengths) for them to explore.


 

To begin, I will introduce the the SDO image URLs and how they are generated.

The URLs of the images generated by the SDO follow a specific format:

YYYYMMDD_hhmmss_RRR_WAVE.jpg

  • YYYY = Year
  • MM = Month
  • DD = Day
  • hh = Hour
  • mm = Minutes
  • ss = Seconds
  • RRR = image size
  • WAVE = wavelength type

***If you want to explore the SDO gallery yourself, feel free!: http://sdo.gsfc.nasa.gov/assets/img/browse/

Let’s use an example to explore each part of the URL:

url

fig 1. Take a look… Pretty straight-forward right?

We can see that the image was either taken or uploaded at midnight on December 25, 2013. We also know that the image size is 256x256px, and that the image is of the sun of the wavelength HMIB.

Now let’s take a look at how our code works

The code can generate the image URLs because a few parts of the image URLs from the SDO are very predictable. Take a look at the image URL from 12/25/13 and compare it to the 12/26/13:

fig 2

20131225_000000_1024_HMIB.jpg

20131226_000000_1024_HMIB.jpg

They look nearly identical right? The only difference is one digit. 20131225 versus 20131226. So the only thing that seems to change would be the six digit date stamp. So we can simply have the code increase the date accordingly with consideration of changing months and years, but keep the “_000000_1024_HMIB.jpg” the same as it is right?

Nope. Unfortunately, the URLs are not always this nice and consistent. Only 4 other wavelength types share this same consistency. The other wavelengths however, are not so predictable. Take a look at the URLs of wavelength 0131 on two separate days:

fig 3

20131225_000034_1024_0131.jpg

20131226_000046_1024_0131.jpg

While the date incremented as expected, the six digit time stamp is what changed. While the two HMIB images were either taken or uploaded at exactly midnight, the two 0131 images were taken/uploaded at different times from each-other; one was taken/uploaded 34 seconds after midnight, and the other was taken/uploaded 46 seconds after midnight. Take a look at a few more from a more recent month, and you will notice that there is no predictable pattern of when the 0131 images are taken/uploaded:

URLs0131EXAMPLE

fig 4. 001146, 001246, 001234, 001222, 001158, 001210… As far as I can tell, these time stamps are just random.

 

Side Thought (not essential to the task at hand, you can skip this if you’d like) Also, you are probably wondering why I have been saying, “taken/uploaded.” ‘throughout this post, instead of just one or the other. Take a look at the date and time under “Last Modified,” and compare it to the date and time stamps of the corresponding URLs. You will notice that the “Last Modified” date and time is always before the URL date and time. I am guessing that “Last Modified” indicates the time at which these images were taken, while the image URL represents the time that the images were uploaded. But I may be wrong because I have no way of being sure that the clock on the SDO is in sync with the clock of the wherever the images are being uploaded. What time zone is the SDO operating in? GMT like the ISS?

There also seems to be no correlation between the “Last Modified” date and time with the image URL’s date and times. All images share the same “Last Modified” time of 20:18, but none of them share the same URL time stamp. Because of this irregularity, the code cannot predict the URLs of the images, and therefore, we are unable to add most of the wavelength image sets that we would like to. It is a shame because these wavelength image sets that we cannot utilize are the ones that are the most visually appealing.

Bk7U5R3CQAAkoSf

None of these beautiful wavelengths can be used, unless we find a solution…

I have thought about ways to include these wavelengths for awhile now, and there are two solutions that I have arrived at, and B. As we continue, keep in mind that for a time-lapse, we only need 1 image per day…

Solution A. If you take a minute to examine the time-stamps of the URLs again, you will notice that while they do not exactly match each-other, they are all within a certain range. In fig 4, the date stamps of the URLs always seem to fall between 001000 and 001300. Using this trend, I could write a for-loop that would:

  1. Start at 20140610_001000_1024_0131.jpg
  2. Test to see if that URL leads to an image.
    1. If the URL leads to a broken image (404 not found), then the code will just continue to step 3.
    2. If the URL leads to a working image, then add the URL to the array (list of working images). Then the code will skip to step 4.
  3. The testing URL time-stamp is incremented by 1, to 20140610_001001_1024_0131.jpg, and then step 2. is repeated.
    1. This will continue until either a working image URL is found, or the for-loop reaches 20140610_001300_1024_0131.jpg. If it does reach 001300, then it will continue to step 4.
  4. The Testing URL date-stamp is incremented by 1, to 20140611_001000_1024_0131.jpg., and step 2. is repeated.
  5. This for-loop will run until the array is filled with X-number of working URLs (which translates to X-number of days).

(Note that “20140610” is just an example date-stamp. It will be determined by the date on which the program is loaded)

The only thing preventing me from writing this code is step 2A. and 2B. As you know, I do not know if there is a a way to test whether a URL leads to a broken image or a working image, before it is added to the array, and then loaded in the browser…

Solution B. The other solutions is somewhat of a semi-fix. We could simply download 100 images (days) of each of the currently unobtainable wavelengths, and load it directly into the browser. This means that the Sun under these wavelengths will never be updated, and the user can only view a time-lapse of the sun within a permanently fixed interval. After all, the purpose of this project is to create an educational tool, not so much of a research tool. A school teacher does not really need a “live” version of the Sun in order to point out certain features such as solar flares and sun spots to a class. Having a “live” projection of the Sun is a cool, but not terribly essential feature.

We could provide the functioning 5 wavelengths, but also have a separate mode that allows the users to view the other wavelengths that are not “live.” This does have some benefits too. Because the images will be downloaded onto the laptop, these wavelength sets of the Sun can be viewed without access to the internet.


I would prefer solution A, but I do not know if it is even possible. Maryam got me interested in learning more about Computer Networking and Servers, so I will be able to learn a lot along the way while chasing solution A. However, solution B may be the most practical approach, especially since the outcome will be certain, unlike solution A…

I still have to think things through a bit more before I make a decision… If you read this far, I want to thank you for taking the time to learn about my problems. I know it is not your job to solve my problems, but any help at all is welcome and immensely appreciated!

Thanks!~