Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

21cm band. Refurbishing the dish with a new Cantenna.


Recommended Posts

2 minutes ago, SteveBz said:

Very nice, I totally agree.  Can I make 2 observations:?

1) the gif-maker never works until I run Mogrify on it and reduce the size of the .png files, so obviously the automatic gif at the end of 24 hours also always fails.  On my copy I've stripped that out and then I

mogrify -resize 2000x585 *.png

Before run my stripped-out vesion of 'gif'

2) Secondly, I love the debug data-dump, so I always save it in the 24 hr scan, then I have a second python program to extract the data and map it (as you saw).  I also save many more parameters in the .json file than you do, eg datetime, l & b coords and some other stuff.

All feedback is welcome!

With regards to the GIF maker, I never really considered it a problem before you shared your experience with. So that's definitely something I'll look into. I would ideally like to retain the high resolution of each plot, so either I need to add some downscaling in the code before creating the GIF, or just not create a GIF. I could also do a mix of both and let it be an option to create a GIF or not :) 

Debug data. I will also improve this as it currently isn't "truly" sufficient for any debugging. When observing, the software collects an observation centered at the H-line, and another one offset på 3MHz. Then it subtracts these two, to get SNR and to even out the spectrum.

image.png.a9995924bdc33dfc9c0e513b79ef253e.png

image.png.083900ac9bb88562ebe005d4e63e024f.png

Currently, only the final "SNR_spectrum" is included in the debug. Ideally I'd like both the blank, the H-line, and the SNR_spectrum. This will all be included in the new rewrite, together with datetime, all parameters, coordinates and etc.

6 minutes ago, SteveBz said:

My last question is this.  What about planetary movement?  The velocities I measure are about +20 km/s -> -60 km/s.

Planetary rotation is about .5 km/s, so doesn't really matter, but revolution around the sun is a bigger deal:

speed = 150e6*2pi/(365*24*3600) km/s
speed = 30 km/s

So really the velocities should be adjusted by the position of the Earth in respect to the Sun and I'm not sure how to do this. 

What do you think?

Kind regards

Steve.

You are correct. Back when I estimated the rotation curve of our Milky Way, I had to correct for the orbital velocity of the Earth (+- 30km/s).

IgYoaHY.png

Above you can see the uncorrected, blue, velocities and the corrected ones, red. I did this "manually" from the date I performed the observations on. Essentially I calculated the Earth's velocity vector in the observing direction, and added it from the observed velocity.

image.png.d44fc40c845a47d9b3c170b08deec70d.png

image.png.ee4e464f8bb7c5b03a80f5b0616e3261.png

image.png.956f0e19b53ce557b97f6507c77cbc2c.png

Notice, the observed radial velocity in the last image are the blue dots. Then I add the values from second last image to get the red dots. This is also something that can be added to the software, but it's not my priority currently.

Victor

image.png

  • Like 1
Link to comment
Share on other sites

28 minutes ago, Victor Boesen said:

All feedback is welcome!

With regards to the GIF maker, I never really considered it a problem before you shared your experience with. So that's definitely something I'll look into. I would ideally like to retain the high resolution of each plot, so either I need to add some downscaling in the code before creating the GIF, or just not create a GIF. I could also do a mix of both and let it be an option to create a GIF or not :) 

Debug data. I will also improve this as it currently isn't "truly" sufficient for any debugging. When observing, the software collects an observation centered at the H-line, and another one offset på 3MHz. Then it subtracts these two, to get SNR and to even out the spectrum.

image.png.a9995924bdc33dfc9c0e513b79ef253e.png

image.png.083900ac9bb88562ebe005d4e63e024f.png

Currently, only the final "SNR_spectrum" is included in the debug. Ideally I'd like both the blank, the H-line, and the SNR_spectrum. This will all be included in the new rewrite, together with datetime, all parameters, coordinates and etc.

You are correct. Back when I estimated the rotation curve of our Milky Way, I had to correct for the orbital velocity of the Earth (+- 30km/s).

IgYoaHY.png

Above you can see the uncorrected, blue, velocities and the corrected ones, red. I did this "manually" from the date I performed the observations on. Essentially I calculated the Earth's velocity vector in the observing direction, and added it from the observed velocity.

image.png.d44fc40c845a47d9b3c170b08deec70d.png

image.png.ee4e464f8bb7c5b03a80f5b0616e3261.png

image.png.956f0e19b53ce557b97f6507c77cbc2c.png

Notice, the observed radial velocity in the last image are the blue dots. Then I add the values from second last image to get the red dots. This is also something that can be added to the software, but it's not my priority currently.

Victor

image.png

I can only say OMG.

Isn't there some simpler formula like:

If we are only interested in movedment in the plane of the Galaxy, so b=0.
Vm = measured velocity in direction <l>;
Vs = Velocity of Sun around Galactic centre;
Ve = Magnitude of velocity of Earth aound Sun - 29.8 km/s;
phi = angle of the Earth's orbit against the Galactic plane
m = month number
Vm = Vs + Ve . cos(phi) . cos (l) . sin (2.pi. m/12)

I'm just guessing, I haven't derived it, but something like that?

Regards

Steve

  • Like 1
Link to comment
Share on other sites

4 minutes ago, SteveBz said:

I can only say OMG.

Isn't there some simpler formula like:

If we are only interested in movedment in the plane of the Galaxy, so b=0.
Vm = measured velocity in direction <l>;
Vs = Velocity of Sun around Galactic centre;
Ve = Magnitude of velocity of Earth aound Sun - 29.8 km/s;
phi = angle of the Earth's orbit against the Galactic plane
m = month number
Vm = Vs + Ve . cos(phi) . cos (l) . sin (2.pi. m/12)

I'm just guessing, I haven't derived it, but something like that?

Regards

Steve

Finding the Earth's velocity in the direction of the observing area should be fairly straight forward. You can use this formula:

image.png.c338799d8bb1b81ebee0127c90041476.png

Where, RA_1, is equal to the difference between the Earth's orbital direction (RA coordinate 90 degrees west of the Sun's RA coordinate) and the direction of the observing area. This can be done in code without much trouble, and could be added to the debug file! The declination is just the declination of the observing area. Earth_v is Earth's orbit velocity (29.8km/s).

Victor

  • Like 1
Link to comment
Share on other sites

13 minutes ago, Victor Boesen said:

Finding the Earth's velocity in the direction of the observing area should be fairly straight forward. You can use this formula:

image.png.c338799d8bb1b81ebee0127c90041476.png

Where, RA_1, is equal to the difference between the Earth's orbital direction (RA coordinate 90 degrees west of the Sun's RA coordinate) and the direction of the observing area. This can be done in code without much trouble, and could be added to the debug file! The declination is just the declination of the observing area. Earth_v is Earth's orbit velocity (29.8km/s).

Victor

So I we subtract (or do I mean add?) that from the measured Doppler shift, don't we get the true radial velocity of the gas cloud from the Sun?

  • Like 1
Link to comment
Share on other sites

7 minutes ago, SteveBz said:

So I we subtract (or do I mean add?) that from the measured Doppler shift, don't we get the true radial velocity of the gas cloud from the Sun?

Add to the radial velocity, subtract from the doppler shift :thumbright: And yes, that would give us the true doppler- or radial velocity with respect to our solar system/sun (not taking into account the rotation of Earth).

  • Like 1
Link to comment
Share on other sites

55 minutes ago, Victor Boesen said:

Where, RA_1, is equal to the difference between the Earth's orbital direction (RA coordinate 90 degrees west of the Sun's RA coordinate) and the direction of the observing area. This can be done in code without much trouble, and could be added to the debug file! The declination is just the declination of the observing area. Earth_v is Earth's orbit velocity (29.8km/s).

In other words:

Dec1=Dec

RA1 = RA_Obs+90-RA_Sun

Is that right?

Steve

Link to comment
Share on other sites

1 minute ago, SteveBz said:

In other words:

Dec1=Dec

RA1 = RA_Obs+90-RA_Sun

Is that right?

Steve

RA1 = RA_Sun - 90 - RA_Obs

And you only really need the absloute value of the above so:

RA1 = abs(RA_Sun - 90 - RA_Obs) = | RA_Sun - 90 - RA_Obs |

  • Like 1
Link to comment
Share on other sites

19 minutes ago, Victor Boesen said:

RA1 = RA_Sun - 90 - RA_Obs

And you only really need the absloute value of the above so:

RA1 = abs(RA_Sun - 90 - RA_Obs) = | RA_Sun - 90 - RA_Obs |

OK, cool. I got the sign wong.  It's always the way.  I won't bother using abs() because it's just needless processing and complexity. 

RA_Obs is the same as the RA that we are looking at, but where is RA_sun? Do you think I can get it from astropy?

Kind regards

Steve.

Link to comment
Share on other sites

Just now, SteveBz said:

OK, cool. I got the sign wong.  It's always the way.  I won't bother using abs() because it's just needless processing and complexity. 

RA_Obs is the same as the RA that we are looking at, but where is RA_sun? Do you think I can get it from astropy?

Kind regards

Steve.

RA_sun is the right ascension of the sun in the sky. I'm sure you can get it with astropy, although I've not used it myself. I use PyEphem, for which it's very straight forward.

image.png.89e4c67d2c3888bca4cefe7c1870da3f.png

Where Jupiter should of course be replaced with Sun.

  • Like 1
Link to comment
Share on other sites

35 minutes ago, ZiHao said:

https://astronomy.stackexchange.com/questions/41196/looking-for-a-routine-to-correct-for-local-standard-of-rest-lsr

Hope this helps. I have tried this routine by manually entering the individual frequency value, it matches with the spectrum from the LAB survey.

ZiHao, nice to see you back.  Impressive.  I'll try it out.  It doesn't look too difficult.

Kind regards

Steve.

  • Like 1
Link to comment
Share on other sites

6 hours ago, ZiHao said:

https://astronomy.stackexchange.com/questions/41196/looking-for-a-routine-to-correct-for-local-standard-of-rest-lsr

Hope this helps. I have tried this routine by manually entering the individual frequency value, it matches with the spectrum from the LAB survey.

So I've tried it out.  Again, as usual, I'm not sure I got the sign right and some of the code is a bit clumsy.  Here's the code:


    # Define RV of 29.8 km/s
    rv = 29.8 * u.km / u.s 
    H_FREQUENCY = 1420405000
    c_speed = 299792.458 # km/s
    for coords, signal in sorted(data.items(), key=lambda x: x[0]): 
        # Create Array of RAs
        raSig=signal[2]
        ras.append(raSig)  # RA
        # Create Array of DECs
        decSig=signal[3]
        decs.append(decSig) # DEC
        # Create Array of Peak signals
        sigs.append(signal[0]) # peak dB value
        # Convert Frequency to velocity
        v_doppler = c_speed*(signal[1]-H_FREQUENCY)/H_FREQUENCY
        # Calculate adustment due to Earths rotation around the SUn.
        observation = ICRS(ra=raSig*u.deg, dec=decSig*u.deg, \
            pm_ra_cosdec=0*u.mas/u.yr, pm_dec=0*u.mas/u.yr, \
            radial_velocity=rv, distance = 1*u.pc)
        rvAdj = observation.transform_to(LSR()).radial_velocity
        # Adjust Doppler velocity
        v_doppler=v_doppler+float(str(rvAdj)[:5])
        # Create Array of adjusted velocities
        vels.append(v_doppler)

Please feel free to peer-review. Here's the output the velocity range seems greater.  It was -20 to +60 now it's -50 to + 70:

image.thumb.png.b0613361988d3db6bbfd214e5eac883a.png

Kind regards

Steve

Edited by SteveBz
Added code comments
Link to comment
Share on other sites

One further point on the gif bit.  My PC is a Linux-based PC with 16GB or RAM and 2 GB of swap.  A couple of days ago, I increased the swap size to 40 GB and the gif convert function worked fine, so it's clearly a question of memory.  I don't know what the cut-off is.

Steve.

Link to comment
Share on other sites

42 minutes ago, SteveBz said:

One further point on the gif bit.  My PC is a Linux-based PC with 16GB or RAM and 2 GB of swap.  A couple of days ago, I increased the swap size to 40 GB and the gif convert function worked fine, so it's clearly a question of memory.  I don't know what the cut-off is.

Steve.

Thanks Steve, your testing is very valuable to me! I will most likely decrease the dpi at which the observation image is saved at. A 2-300mb gif isn't really what many would expect from a gif. Ideally it should be sharable on social media and etc, without taking up too much space/loading time.

  • Like 1
Link to comment
Share on other sites

10 minutes ago, SteveBz said:

And here is my attempt by Galactic Coords.  Hmmm.... The colours look good, but the rest looks a bit scary 😅

image.thumb.png.91cfbd558c26448917efb6053616680a.png

The Gaia plot on the ESA website looks a little nicer 😄

Steve.

Questions:

According to the paper attached.

1) At l = 125 degrees the radial velocity seems to be a minimum.  That looks right.

2) At l = 0  degrees, the Galactic centre, the radial velocity should be zero.  Not shown.

3) At l = 200  degrees, the radial velocity should be large and away from us.  It's large and towards us.

4) At l = 50  degrees, the radial velocity should be large and towards us.  It's large and away from us.

Again, I think maybe I have the sign the wrong way round.

I think I might also play with the plot a bit to make it easier to read.

What do you both think?

Kind regards

Steve.

Mapping_the_Spiral_Structure_of_the_Milk.pdf

Link to comment
Share on other sites

Very interesting plot! It looks correct to me. It's a little difficult to comment on the questions you have comparing the paper to your plot though😅 Even equatorial coordinates can be hard to interpret/understand sometimes, so galactic coordinates are even more difficult!

I have some good news! I've just been testing the new rewrite of the software and compared it to the current software. I have managed to get a pretty consistent performance increase, which I can imagine will only be even better on slower machines (raspberry pi ant etc).

image.png.d4bdd942d8c5b301113f903f3fddc40b.png

I'm still testing the rewrite until I merge the rewrite branch with the main branch. If you want to, however, you can try the rewrite if you pull/clone from the rewrite branch. I would advise you to do so in a separate folder, so you don't overwrite your current files.

To clone the rewrite branch:

git clone https://github.com/byggemandboesen/H-line-software -b rewrite

There will most likely be bugs, hence why it's not on main branch yet, but feel free to test it and take note of any bugs that may occur. Then I will fix them:thumbright:

Victor

  • Like 1
Link to comment
Share on other sites

28 minutes ago, Victor Boesen said:

Very interesting plot! It looks correct to me. It's a little difficult to comment on the questions you have comparing the paper to your plot though😅 Even equatorial coordinates can be hard to interpret/understand sometimes, so galactic coordinates are even more difficult!

I have some good news! I've just been testing the new rewrite of the software and compared it to the current software. I have managed to get a pretty consistent performance increase, which I can imagine will only be even better on slower machines (raspberry pi ant etc).

image.png.d4bdd942d8c5b301113f903f3fddc40b.png

I'm still testing the rewrite until I merge the rewrite branch with the main branch. If you want to, however, you can try the rewrite if you pull/clone from the rewrite branch. I would advise you to do so in a separate folder, so you don't overwrite your current files.

To clone the rewrite branch:

git clone https://github.com/byggemandboesen/H-line-software -b rewrite

There will most likely be bugs, hence why it's not on main branch yet, but feel free to test it and take note of any bugs that may occur. Then I will fix them:thumbright:

Victor

Hi Victor,

Very good.  Are the two versions compatible?  I would certainly like the performance improvement and I haven't modified the host version on the RPi, but I have modified the version on the client - mainly to to save the .json file.  I'll have a look at my mods.  If you've included them all, there's no reason I shouldn't upgrade the whole thing.  In fact it would be much better. I always run in debug mode and save the .json file.  As far as I'm concerned, it's the main output.  The .png will be more interesting when I start plotting the arms of the Milkey Way.

Kind regards

Steve.

  • Like 1
Link to comment
Share on other sites

34 minutes ago, SteveBz said:

Hi Victor,

Very good.  Are the two versions compatible?  I would certainly like the performance improvement and I haven't modified the host version on the RPi, but I have modified the version on the client - mainly to to save the .json file.  I'll have a look at my mods.  If you've included them all, there's no reason I shouldn't upgrade the whole thing.  In fact it would be much better. I always run in debug mode and save the .json file.  As far as I'm concerned, it's the main output.  The .png will be more interesting when I start plotting the arms of the Milkey Way.

Kind regards

Steve.

If you're only using the debug file and processing that yourself then you'd need to perform a slight modification to your own stuff.

image.png.e59f8552a69243b72967f3c9bfe425b7.png

The data which the software plots is the "SNR Spectrum" as a function of the "Frequency list". The new version even includes the doppler and SNR in the debug file as well under "Observation results".

Hope that answered you question! Please correct me if I misunderstood your question:thumbright:

Victor

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

11 minutes ago, Victor Boesen said:

If you only using the debug file and processing that yourself then you'd need to perform a slight modification to your own stuff.

image.png.e59f8552a69243b72967f3c9bfe425b7.png

The data which the software plots is the "SNR Spectrum" as a function of the "Frequency list". The new version even includes the doppler and SNR in the debug file as well under "Observation results".

Hope that answered you question! Please correct me if I misunderstood your question:thumbright:

Victor

Ok, I'll look later and let you know. 😄

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, SteveBz said:

Ok, I'll look later and let you know. 😄

So I understand what you said now.  Yes, you've answered my question but I may have some suggestions.  I think I probably need to look at the code properly.

Steve.

Link to comment
Share on other sites

In the meantime, because I can pick out the main peak, but not the secondary or other peaks, I can only plot one Galactic Arm.  Here it is (I I don't know what the little blue one is and I don't quite know where the Sun is - any suggestions?):

image.png.c78e1f265fca8bc05e71daa4917a5e53.png

Link to comment
Share on other sites

17 hours ago, SteveBz said:

In the meantime, because I can pick out the main peak, but not the secondary or other peaks, I can only plot one Galactic Arm.  Here it is (I I don't know what the little blue one is and I don't quite know where the Sun is - any suggestions?):

image.png.c78e1f265fca8bc05e71daa4917a5e53.png

It seems to me that the orange arm is the Perseus arm.  It looks about right.  Galactic Centre seems to be at (0,0) and we are at (0, 8.5).  

I got these just finding the peak dB value and doing the velocity calculation to calculate 'R' and then plotting - while converting (R, l) to Cartesian Coords.

At first I thought the inner, blue arm was just noise, but now I think it's a real arm, I just got the coordinate conversion wrong.  Do you guys know, is the maths different in each Quadrant?

So to push the limit then I subtracted the main Gaussian peak from each 'Data' profile and looked for the 'Max' again (as above).  Now I have a whole series of beautiful arms (like 4 different arms), but all in the wrong place 🥴

Steve.

  • Like 1
Link to comment
Share on other sites

50 minutes ago, SteveBz said:

Do you guys know, is the maths different in each Quadrant?

Yes, it is. You can only use the radial method, I believe it's in one of the papers you shared, for galactic longitude between 0-90 degrees (in reality more like 20-75 because of the galactic bulge and etc).

brint4__01.jpg.87149963bc19d27f6e07136094c55658.jpg

Radial method above.

Victor

Edited by Victor Boesen
  • Like 1
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.