Jump to content

2052839955_Mobilephonebanner.jpg.a502a319d7033354d442937f2edd0c2c.jpg

Exposure time calculator app


dan_adi
 Share

Recommended Posts

Posted (edited)
35 minutes ago, Victor Boesen said:

Looks like a very interesting project!! Do you have a GitHub repository where I could have a look around?

Victor

Hello, I don't have a git hub repository. 

I wrote it in python, and used streamlit to make it an web app. Afterwards I used docker to contain the applications and it's dependencies into one place and deployed it.

Streamlit is nice and fast for making WebApps, but the code is re run after a user action, so it took me a couple of days to figure out how to retain the user input values into variables, otherwise every variable is reset and nothing is stored.

I had to use their session_state method to retain values. A little bit weird, but it works.

If you want I can see if I can push the app docker image to their repository, and then you can download the docker image on your PC, and run it locally.

Or I can send you the individual .py files so you can compile it on your own.

Edited by dan_adi
  • Like 1
Link to comment
Share on other sites

1 hour ago, dan_adi said:

Hello, I don't have a git hub repository. 

I wrote it in python, and used streamlit to make it an web app. Afterwards I used docker to contain the applications and it's dependencies into one place and deployed it.

Streamlit is nice and fast for making WebApps, but the code is re run after a user action, so it took me a couple of days to figure out how to retain the user input values into variables, otherwise every variable is reset and nothing is stored.

I had to use their session_state method to retain values. A little bit weird, but it works.

If you want I can see if I can push the app docker image to their repository, and then you can download the docker image on your PC, and run it locally.

Or I can send you the individual .py files so you can compile it on your own.

Alright, no worries ;) I was just curious about the program and wanted to have a look at the code and etc. I don't do imaging so I don't need to code so no need to send it :) The user interface looks very good and straight forward, what library did you use to make it?

Victor

Link to comment
Share on other sites

1 minute ago, Victor Boesen said:

Alright, no worries ;) I was just curious about the program and wanted to have a look at the code and etc. I don't do imaging so I don't need to code so no need to send it :) The user interface looks very good and straight forward, what library did you use to make it?

Victor

I've searched for some time for something easy, and I came across the Streamlit library for python. 

It was way easier than using tkinter.

For filter simulation I used the synphot library published by Space Telescope Institute. These are the guys that look after Hubble and JWST. 

Also the astropy library came in handy for automatic conversion of units. This reduces the chance of an error creeping in when working with flux density units, correcting for airmass-extinction etc.

The main equation is fairly simple, you can find different variations of it in the references tab. By far the hardest part was simulating the filters and fluxes, but we are grateful that the pros make their tools freely available.

Astropy is also very cool to work with. For example I made a small bit of code that reads my fits files header, extracts the focuser position and focuser temperature. Then I make a liniar fit between those 2 and get the temperature coefficient. This way I can average the results from a few nights, enter the coefficient in my focuser software and then I only need to focus 1 time during the night with temperature compensation enabled. Cool stuff 

  • Like 1
Link to comment
Share on other sites

3 hours ago, dan_adi said:

I've searched for some time for something easy, and I came across the Streamlit library for python. 

It was way easier than using tkinter.

For filter simulation I used the synphot library published by Space Telescope Institute. These are the guys that look after Hubble and JWST. 

Also the astropy library came in handy for automatic conversion of units. This reduces the chance of an error creeping in when working with flux density units, correcting for airmass-extinction etc.

The main equation is fairly simple, you can find different variations of it in the references tab. By far the hardest part was simulating the filters and fluxes, but we are grateful that the pros make their tools freely available.

Astropy is also very cool to work with. For example I made a small bit of code that reads my fits files header, extracts the focuser position and focuser temperature. Then I make a liniar fit between those 2 and get the temperature coefficient. This way I can average the results from a few nights, enter the coefficient in my focuser software and then I only need to focus 1 time during the night with temperature compensation enabled. Cool stuff 

Sounds excellent! I've made a few UI applications with dearpygui, which I've become quite fond of. Quite straight forward to work with. I have also used Astropy for a couple projects of mine and definitely think I'll be using it in the near future again once a relevant project comes to mind! I look forward to see more about the application on here ;)

Victor

Link to comment
Share on other sites

  • 3 weeks later...

In a few days I will update the app. Hopefully by the end of the week

What I've added:

1. Changed the user interface a bit.

2. Corrected calculation of Image quality FWHM.

3. Added a simulation of Image FWHM so a user can see how this parameter changes with different airmass, guiding during the night etc. Also the user can see each term contribution to final FWHM so one can get an ideea on how to improve the setup

4. Cosmology module. Based on user redshift input, different calculations are performed like proper distance, comoving distance, recession velocity etc.

The cosmology module also has a catalog search engine to Sinbad and NED in order to easily find redshift and other parameters.

The user can search multiple targets and get a table result.

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.