Sunday, May 5, 2013

Final Post



Dr. Bellis and I had our last internship meeting on May 1st, following the wonderful poster session. Through the internship, I have acquired much knowledge and skills from Dr. Bellis' instructions and from the experience of making the simulations.


Here's a list of things I learned:
  1. How the coordinate system on Processing work
  2. Codes for drawing lines, point, rectangle, ellipse.
  3. Color codes (gray scale, RGB color--> color selector tool, color transparency)
  4. Learned what the basic set-up codes mean.
  5. Designed a free fall simulation
  6. Designed a projectile motion simulation.
  7. Learned how to display text on the window
  8. Codes for displaying a string (time, position)
  9. Learned how to create buttons on Processing (made previous simulations interactive using the buttons).
  10. Background and history of Dark Matter.
  11. Made an interactive model of sun’s orbit around the center of the galaxy, and the Earth’s orbit around the sun (shows epicycles)
  12. Learned about the history of particle physics (quarks, anti-quark, meson, the November Revolution, Samuel Ting, AMS, WIMP)
  13. Started making a plot on Processing by writing codes to draw the axis and tick marks.
  14. Dr. Bellis made my codes easier to access and understand, and created a new tab that contains all the codes that do not need to be altered.
  15. Drew sine, cosine, and exponental curves on the plotting simulation.
  16. Plotted data points by inserting the positions individually.
  17. Learned how to call up data from a file on to Processing and plot it.
  18. Fixed the tick marks on the axis for the AMS experiment.

Though listing is easy, the effort behind each number lists is inexplicable. Dr. Bellis and I worked hard on developing the simulations. Sometimes we twisted our minds to fix each errors and sometimes we surfed online to search for answers. 

The moments were I find out the solution or the correct codes for a project that Dr. Bellis assigned to me were the motivations that kept me going even when the 'error' notification refuse to vanish for more than ten trial-and-errors. Going off with the deadly 'error' notifications, one challenge that I encountered during this internship is probably finding out which code (or codes) was causing Processing to refuse to produce my simulations. These moments were most often frustrating to the point that I wanted to give up and wait for Dr. Bellis' aid, but then whenever this thought came on, I knew that the solution is coming near. According to my experience, it costs me on average of 45 minutes of being stuck on a problem before the solution bulb in my brain 'blinks' and the answer comes out. The best part of encountering each obstacle is the joy I shared with Dr. Bellis when I showed him the simulations I made. There were always high-fives involved and Dr. Bellis' exciting sharing of my simulations with his colleagues.

I really enjoyed this year's STEM internship with Dr. Bellis. He gave me an incomparable introduction to programming and particle physics.

An advice for next year's science interns: It always seems impossible until it's done, so don't be frustrated by each challenge you meet during your internship, keep trying and the answer will eventually find it's way to you. :)

Suggestion to STEM Program: none :P
Have a nice summer vacation! :)
A world with ice cream planets 


Friday, May 3, 2013

5/1 Poster Session + Last Meeting


My Poster! :)

Today Dr. Bellis and a few of Siena's physics professors came to our poster sessions. During the poster session I shared my work with many teachers at Emma and they all seemed to be very intrigued by the simulations I made and the process of making them. I felt very accomplished and excited when I talked them about my work. I was able to answer most questions the teachers asked me, except one. More than three of the teachers asked me "do you know now long it takes for sun to orbit around the galaxy?" when I introduced them my sun and earth simulation.

So, after some search online, here's the answer to that question:
It takes ~230 million years the solar system to orbit once around the Milky Way Galaxy.

That same afternoon, I arrived at Dr. Bellis' office for our last meeting. He was chatting with another professor about how our school looks like Hogwarts and how our traditions are so funny and odd. When we returned to the office, I fixed the axis (the numbers were off) and figured out that the code for labeling Y-axis needed some change, it did not take into the information we put for yhigh and ylow which made the labels messed up.

Fixed version of the codes: 


 // Draw the tick-marks
        textFont (f,12);

        for (int i=0;i<nytick;i++)
        {
            int ytick_loc = yaxis_window_hi+(i*separationy_ticks)+remaindery_ticks;
            line (mid_x-tick_width,ytick_loc,mid_x+tick_width,ytick_loc); //y-axis marks
 
            float val = (yhigh - (deltay_ticks*i));  --> where the problem was. 
            String sval = nf(val,1,2);
            text (sval,mid_x+tick_width,ytick_loc);
        }

Originally we had int val= (xhigh - (deltay_ticks*i)); which caused the tick marks to be 400, 399, 399, 399, 399 etc.  I figured that xhigh had to be changed to yhigh (yhigh= 0.4) because it is for the y-axis (an obvious mistake). After change, the tick makes became all zero. We then figured out that when we do "int" in front of "val" the computer automatically changed deleted the decimal points and make every value an integer (which is zero in this case because yhigh=0.4). By changing int val to float val, the computer stopped changing the tick marks to integers and the problem was fixed. Looking at the numbers, I was disturbed by the fact that the numbers had extra zeros behind their last decimal points (ex: 0.400, 0.390, 0.380, 0.000, etc.) so I decided to fix them so that they only have two decimal points. While Dr. Bellis was talking with another student, I found a code that can limit the amount of integers in front of and behind the decimal (nf(# or variable, # of decimals to the left, # of decimals to the right)). Our final plot looks like this: 
Data from AMS Experiment
:) Everything is right!





Thursday, April 25, 2013

4/17 and 4/24


On 4/18, Dr. Bellis was out in Denver for a meeting, so our internship was canceled.

On 4/24, I got nasal allergy and had to cancel the meeting because of my intense running nose. Fortunately, the allergy went away just before Honors Convocation started, and I was able to receive my award without sneezing. :)
Dr. Bellis and I communicated via e-mail after the ceremony. We made some corrections to my poster. :)

5/1: Poster Presentation!!! Dr. Bellis will be coming to see the posters and tour around the campus.

Friday, April 12, 2013

4/10 Plotting Ting's Data, SUCCESS!!


Rather than inputting all the data by hand into Processing, is there an easier way to do it?
The answer is yes, as long as you have the data saved somewhere in your computer or on a URL. 

My project today was to find out how to tell Processing to call up data just by inserting the file name that contains the data points we want my simulation to plot. Dr. Bellis sent me a tutorial of a code called loadStrings() which I can use to input the data to my plot. After looking at the code description (http://processing.org/reference/loadStrings_.html), I knew what I needed to do to successfully put the data in. I just had to save the data that Dr. Bellis sent me, change it into a .txt file, create a folder called "data" in my simulation file, and enter loadStrigns("ams_data.txt") in the codes I have for plotting a graph. However, I did all the processes that I just mentioned, but there continued to be an error saying that it cannot find a file named ams_data.txt. I was so troubled and tried doing the same thing many times, looked up other codes and similar simulations' codes, but still failed at loading the data to my simulation. I asked Dr. Bellis for assistance and he figured out that the reason that the computer could not find the file is because I created the folder name as "data " (with a space) and not "data". This difference cannot be seen with bare eyes when one clicks on the folder. Now I know the computer treats a word and a word with space differently, that's why my ams_data.txt could not be located.

 The simplest mistake can cause a long time frustration...

After successfully stopped Processing from saying "cannot find the file named ams_data.txt", we encountered another trouble. The plot only shows one dot instead of the many dots we have on our data file. This time, because I read other people code on uploading a .txt file to Processing, I figured out what our mistake was. We had our datapoints separated with spaces, but Processing can only read datapoints that are separated by commas. Dr. Bellis rushed up (because there were only 5 mintues left before I had to leave) and sent me another ams data file, this time, commas replaced the spaces in between the numbers. After all the incidents, we finally were able to plot the data points.
Here are the results: 
Our plot
(data points from the AMS experiment lead by Samuel Ting)
Codes: http://www.sos.siena.edu/~mbellis/ew_processing/ams_data_first_try.html

Official plot with same data
Generated by the AMS team
(notice the difference between their scale and my scale for the plot)
The shape of our plot and the plot made by the AMS team are very similar, they look slightly different because they use a log scale (which I haven't figure out how to do on my simulation).

Next week, Dr. Bellis will be going to Denver for a conference, so we will not be meeting. He will send me readings to read and work to do via e-mail. :)





Wednesday, April 3, 2013

4/3/2013 Plotting Continued

 I worked with Dr. Bellis on plotting during this meeting. Over the break, Dr. Bellis took the code that he and I worked on and simplified it even more. Now, the user just have to enter the equation and does not have to made extra changes to the codes. We also worked on how to input data points and plot them using Processing. We used the data from Samuel Ting's published report on AMS findings (see my previous post for more information on this topic) and plotted the first five points on our simulation.
Instead of drawing lines to form a graph, we drew ellipses (circles) to plot each data point.
Codes used for plotting data points:

  xpts[0] = 0.575;  ypts[0] = 0.0947;
  xpts[1] = 0.730;  ypts[1] = 0.0919;
  xpts[2] = 0.905;  ypts[2] = 0.0902;
  xpts[3] = 1.050;  ypts[3] = 0.0842;
  xpts[4] = 1.330;  ypts[4] = 0.0783;  

  plot.draw_data(xpts,ypts,color(255,0,0)); //instead of drawing equations we draw the x- and y- values. 


There are many things that we can do to improve this graph. We are thinking on how to autoscale the graph produced (we made our simulation able to auto-adjust the tick marks based on the size of the window the users want), but we have not figure it out yet. 

Dr. Bellis and I are the first ones to create graphing codes for Processing (usually it is used for art-related purposes, not science), so we are going to upload or codes to the internet and let more people know about this function and help us improve the codes. :)

For the next few weeks, I am going to start drawing graphs to present Dr. Bellis's thesis on Dark Matter. :) 


Dark Matter News Update- Not discovered


Yesterday, Samuel Ting presented the results that he got from AMS (mentioned in my previous blogs) and indicated that the information does not show signs of Dark Matter. Their results show that AMS has detected an excess of positron that may indicate the existence of dark matter (this is not the first time people find excess positron). However, the data are not conclusive enough, and the researchers need more time analyzing and collecting data for precise conclusions.
Other than the news that dark matter is not found, the data published indicate that the AMS experiment currently have the best set of experimental data, as you can see from the plot below. :)
To state dark matter has been found, the last curve will have to go down and to form a hill, but it doesn't. (This can be dark matter or pulsars) The data after the last point still need more analysis and samples, so they are not published or considered for the conclusion. 

Link to the published report and summary: http://physics.aps.org/articles/v6/40


Wednesday, March 13, 2013

Make Plotting Easier to Access

One of the purpose of my project is also to make the simulation codes easy to access and understand. So in the past two weeks, Dr. Bellis and I have been working on how to make plotting curve codes easier to change (make it more general).

Here are two pictures of the plotting simulations that I have made. On the left, there are two curves (on sine and one cosine) that is moving and. On the left, one can see a exponential curve that is moving to the left as each frame goes by.

Dr. Bellis and I changed the plots so that the coordinate system and the equations that we want to plot is in one tab (called simple_plot), and the code for start plotting and the amplitude and period changes are on the other tab (called plotting_tools).
From the picture above, all the complicated codes are put in one tab, and the one that one may want to manipulate (period, frequency, etc.) are on the plotting_tools tab. To make one simulation, we just have to call up simple_plot in the codes that is under the plotting_tools tab.

Due to spring break, I will not be going to Siena for internship for two weeks. After two week, I hope I can start to make graphs that can show the amount of dark matter captured on earth! :)