nikosarcevic / CosmOracle

https://share.streamlit.io/nikosarcevic/cosmoracle/main
GNU General Public License v3.0
22 stars 2 forks source link

Add conversion between angular and physical size #40

Closed mtrebitsch closed 2 years ago

mtrebitsch commented 2 years ago

Hello, The app looks really great to use, and I have a quick "feature enhancement" suggestion. It would be super useful (at least for astronomers) to have a quick conversion between the angular size of an object and its physical size, since we are usually switching between the object apparent size (e.g. in arcsec) and its actual physical size (e.g. in kpc). It should be relatively straightforward to get from the transverse comoving distance, but having it "already computed" would make my (and others?) life easier!

nikosarcevic commented 2 years ago

Hello, The app looks really great to use, and I have a quick "feature enhancement" suggestion. It would be super useful (at least for astronomers) to have a quick conversion between the angular size of an object and its physical size, since we are usually switching between the object apparent size (e.g. in arcsec) and its actual physical size (e.g. in kpc). It should be relatively straightforward to get from the transverse comoving distance, but having it "already computed" would make my (and others?) life easier!

Thanks for there awesome suggestion! We will work on this (we are a bit tired now ;) )

lonbar commented 2 years ago

I've added a simple feature in #44 that shows the spatial extension of an object of angular size 1'' at redshift z. This is currently hardcoded, but we could allow different angles.

mtrebitsch commented 2 years ago

Thanks! I'm not reopening the issue (maybe I should? Or open a new one?) but I think there's a typo somewhere in the code, because the angular sizes I get are roughly ~3600 times too big. For instance, at z=6, Cosmoracle gives ~19 Mpc per arcsec, and by comparison Ned Wright's tool gives ~ 5.8 kpc. My guess is that's there is a degree vs arcsec issue somewhere in the code?

nikosarcevic commented 2 years ago

Thanks! I'm not reopening the issue (maybe I should? Or open a new one?) but I think there's a typo somewhere in the code, because the angular sizes I get are roughly ~3600 times too big. For instance, at z=6, Cosmoracle gives ~19 Mpc per arcsec, and by comparison Ned Wright's tool gives ~ 5.8 kpc. My guess is that's there is a degree vs arcsec issue somewhere in the code?

Thanks for catching this one. We are working on this and it is great you are "testing it". Feel free to report a bug as a separate issue! :)

lonbar commented 2 years ago

Thanks @mtrebitsch for catching it! It should be fixed now. Redshifts of 3, 10, 13, 130 now give results comparable to Ned Wright's calculator.

Who'd thought converting from arcsecs to radians could be this complicated⸮