You are browsing as a guest. Sign up (or log in) to start making projects!

StellarMetrics

  • 5 Devlogs
  • 16 Total hours

A Python script that pulls raw NASA space data, filters and cleans it up, and plots out Hertzsprung-Russell diagrams to show how stars evolve over time.

Ship #1 Pending review

I created a python pipeline tool that takes in astronomical data from telescopes, puts them under a universal header (to make new data sets being added seamless), cleans up the data, runs the data through physics calculations, and finally graphs the data on a Hertzsprung-Russell (H-R) diagram, saving it as a png!

This challenge was incredibly entertaining for me to make (as I want to be an astrophysics major in college). I learned a lot from it despite the hours of debugging and learning what equations to use, and why to use them. I had a blast making this project.

  • 5 devlogs
  • 16h
Try project → See source code →
Open comments for this post

4h 5m 32s logged

Final Devlog!

Day #7 - (2 hours total - 0.75 hours coding, 1.25 hours researching and debugging): After a big break from this project, I’m back to finish it up. I took such a massive break because I’m already almost done with the project! I got the graph working (although there’s plenty of debug stuff to do unfortunately). I will be working through these bugs tomorrow morning as well as writing tests for all my functions to ensure this project is shipped on time.

Day # 8 - (7 hours total - 1.5 hours coding, 3 hours debugging and reviewing code, 2.5 hours documenting): Finished up the project today! Today was a big review day once I fixed my graphs. Once I got the H-R graphs generating as they should, I tinkered with them a little bit to make them look just a little neater. After that, I went through and re-tested all my code, where I found a few bugs. Debugging these was the hardest part of today. Because I wanted this project to be a learning experience for me, I didn’t look up any of the answers when I needed help debugging (as stated in my AI statement, I only ever use it for hints to point myself in the right direction). I went down quite the rabbit hole of rereading my code and trying to figure out where I went wrong. Eventually I realized most of my mistakes weren’t even in the main code itself, but were mistakes in how I was testing the code! Code testing was a big struggle of mine when I took CS50, so I’m glad (even though it took much longer than it should’ve) I was able to identify what issues were present. Everything should be running smoothly now. I made small updates, such as labeling and generating a graph for each telescope data set based on what the user inputs (previously it generated one graph based on the input, now I can generate all 3, with them properly labeled with their respective telescope names). I’m very proud of what I created during this project. It was a big learning experience for me, and I’m excited to work on more astrophysics-related projects in the future. I’ve also just completed my README and am ready to submit! I’ve had a blast creating StellarMetrics!

0
0
1
Open comments for this post

3h 40m 29s logged

Devlog #4
7.5 hours total - (3.5 hours coding, 4 hours researching, working through bugs, brainstorming pipeline functions): Today was the big one. I got my dictionaries in mapper.py finalized and ready to be used, as well as finished up all my data processing/cleanup work in data-interpreter. Getting these hooked up was the first task. It took a while, but I eventually got all data processed and converted to the universal headers. I then ported this into main. After that, I created a function in physics.py to essentially wrap up all of my calculation functions and apply them to any data that it receives (I believe this is actually called a wrapper function, but I could be wrong). I did this so that, as opposed to making my main script messy and filled with different inputs and equations, I had all of those calculations still done and processed in physics.py, with the final calculations simply being called upon in main. Speaking of input, I also updated main to gather user input (in its own user_input() function). This way, the user can choose which data set they want to explore. This day got quite messy, and I found a variety of bugs within my code. Thankfully, there wasn’t anything too big, but it was a tedious process going through and fixing up all the small little things that were breaking my pipeline. Alas, I’ve got nearly everything done now. All the data gets processed and cleaned up in data_interpreter, and calculated through physics.py. It all gets linked up and routed in main. Now, all I really have to do is create the final H-R plot with matplotlib and write tests for all my functions. I’m very proud of today’s progress!
Please note - In my past devlogs on Stardance, I haven’t posted my exact time worked on the project as I have done so here. However, I have kept a genuine tracker updated each day in “notes.md” in the project folder. I focused more on the technical and personal side of things in these logs. While my logs in notes.md also focus on those aspects, they include my detailed logged time.

0
0
31
Open comments for this post

4h 19m 16s logged

Devlog #3

I haven’t posted a devlog on here in a while, but I’ve got quite a bit of progress to show off. First, I finished up some extra stuff in my physics script to calculate for telescope errors (more detail on that in the actual project).

Next, I learned how I’m going to make the data in my project under universal headers! Essentially, for any telescope data added, it’ll need to be added to a dictionary containing each of the telescope data’s names (in other words, a master key of all the different places data is coming from). From there, that data is filtered through a seperate, smaller dictionary, and the different headers used to classify data in each file are renamed. These new universal names are then run through the equations to for all calculations (they will then be plotted on an H-R diagram; this will be tomorrow’s work). I’ve the skeleton of everything up, now I just need to fill in the data, put it all together, and get it plotted. I spent roughly an extra hour learning where to find the data for different telescopes (such as GAIA and Kepler data) and learning how to incorporate them in my code.

I also decided to go from simply pasting the telescope data url’s into my code to now getting sample sets of the data these files have, downloading them, and incorporating THOSE into my code. I learned it would make things run much smoother and cleaner (I spent an hour researching the pros and cons of this decision and how to integrate it).

The code I’m showing right now is the very rough drafts of everything. It will be all filled in by tomorrow.

0
0
38
Open comments for this post

2h 37m 38s logged

Devlog #2:

Days #2 & #3:
Quick update: In my previous devlog, I stated that I’d “spent my free time” over a couple days when I couldn’t actually code going over how pandas works. I want to clarify that this learning process took approximately 2 hours (I just wanted to quantify my time with an update in this devlog as opposed to having it vague as I previously did).

I decided that I wanted to expand my project much more to match what I originally envisioned for the project. I’m essentially making it so that the project can take more telescope data than just the original HYG data; it will now take in data from GAIA DR3 and the Kepler telescope as well (more will likely be added before the project is complete).

As for actual coding work, I began by creating different scripts for each “section” of the project. Once this setup phase was complete, I went straight to work on getting the physics side of things set in stone for this project. After around 30 minutes of numpy review (thankfully, I used it a project a couple months ago, so I remembered how to use it fairly well), I eventually finished up the code. Once this was finished up, I created a test script tailored specifically towards this physics script, and ensured everything ran smoothly without issue.

I made it a big point to myself to not just “plug in” the equations I needed for my project. I want to major in astrophysics, so I made sure I understood exactly what was happening with these equations: how they worked, why they worked, and how they applied to both my project and real research work.

0
0
33
Open comments for this post

1h 4m 41s logged

Devlog 1:

Day 0 Log - I am currently starting my first project in a while as a beginner programmer. I am creating a Python tool that processes NASA star datasets to plot a Hertzsprung-Russel diagram using matplotlib and pandas. I’m writing a code that will process the data, clean it up, and turn it into a visual star map that shows how stars evolve and cluster by temperature and luminosity.
I am admittedly very rusty with Python and coding in general, and today was spent simply linking up Hackatime with my code and getting the overall setup complete. It took me an embarassingly long amount of time to get this set up properly, but alas, I got it done. I’ve thought about this project for a while, and have a good idea of what I need to get done in my code, so I will work on brushing up on pandas and matplotlib functions tomorrow and begin coding.

Day 1 Log - After finally getting some time after school and work, I was able to work on my project. I ended up having to take a couple days off of actual coding due to family responsibilities, but learned as much as I could about pandas in that time. I spent my free time over the last couple days reviewing pandas functions and overall learning about how pandas takes in and interprets data. I applied what I learned into my code today. I uploaded the raw data from HYG v.44 into my code, and had pandas unzip the file, read it, and plug the data into my csv file. I ran a small test code to ensure everything was uploaded correctly as well. Tomorrow, I will work on having pandas filter out outliers in the data sets I’ve given it. As you can see, it doesn’t seem like much progress was made (and programming wise, it wasn’t), but learning how to write this code correctly took much more time than it seems. Apologies if this Day 2 part of the Devlog doesn’t make much sense; it is getting late and I’m getting a bit tired. I look forward to progressing tomorrow in my project.

0
0
23

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…