alexruiz95 / PTV_SYN

Branch Gen3 is the current version. Codes for generating synthetic particle images for multi-camera systems, configured for use for PyPTV
Other
2 stars 2 forks source link

Get positions from h5 or npz #4

Open alexruiz95 opened 4 years ago

alexruiz95 commented 4 years ago

How do read the positions of the trajectories?

I can read the files in the folder with:

import h5py f1 = h5py.File('jhu_t4_n150')

import numpy as np data = np.load('trajectories.npz')

Don't know how to access the elements/attributes

alexlib commented 4 years ago

@alexruiz95 I suspect Matlab won't be too easy to get into this structure. I'll need to think how to export it in a better way. maybe savemat or just creating ASCII files.

alexlib commented 4 years ago

@alexlib @alexruiz95 can you try to load this mat file? https://www.dropbox.com/s/zyxbiz884a1sayo/test.mat?dl=0

alexruiz95 commented 4 years ago

I was able to load the mat file. It resulted in two workspace variables t 1x121 single and x 121x8000x3 single

I'm assuming there are 121-time steps. How many trajectories should there be ?

alexlib commented 4 years ago

8000

alexlib commented 4 years ago

I was able to load the mat file. It resulted in two workspace variables t 1x121 single and x 121x8000x3 single

I'm assuming there are 121-time steps. RIGHT How many trajectories should there be ? 8000

alexruiz95 commented 4 years ago

Okay, I should be able to get this work. Thanks!

alexruiz95 commented 4 years ago

What should the flow field look like? I just plotted the trajectories and it looks a little weird. Let me know if this correct, if not ill fix my code and try again(:

alex_data_test_2

alexlib commented 4 years ago

I think it's right - we took a homogeneous isotropic case and just throw particles randomly in groups every group starts from some position and spreads. it's great to learn the PTV (not so much the flow field) and the effect of retracting and two-point statistics.

alexruiz95 commented 4 years ago

Great. I am currently working out the image generation aspect. I may isolate one of the groups to study since the domain is spread out and rather large. I will admit I am unfamiliar with the "effect of retracting and two-point statistics" aspect, so any literature/knowledge/codes on that subject would be greatly appreciated!

alexlib commented 4 years ago

sorry, it's a typo: = re-tracking. I meant that you will create now images from these trajectories and then we'll track them and compare.

two-point means that we want to see how distance between two particles is affected by the aberrations and imperfect calibration

alexruiz95 commented 4 years ago

OH okay! Would it be okay to isolate one of the groups? Essentially zoom in / scale it up to enhance the images? Right now the pixels mesh together. this is only 2000 trajectories.

ezgif com-video-to-gif

alexlib commented 4 years ago

of course. you can also subsample it anyway you want

alexruiz95 commented 4 years ago

The images I generated weren't the best. But tracking a small region of 100 trajectories resulted in this so far:

Images: turb_gif

Ground truth: ground_truth_trajectories_jpg

Reconstruction: reconstruction_jpg

alexruiz95 commented 4 years ago

I will likely need to adjust the camera positions and tracking parameters to help optimize the PTV process. But this is a start! Any feedback would be greatly appreciated

alexruiz95 commented 4 years ago

Perhaps we can skype and devise a systematic approach for running these trials. Let me know

alexlib commented 4 years ago

I will likely need to adjust the camera positions and tracking parameters to help optimize the PTV process. But this is a start! Any feedback would be greatly appreciated

it seems to be a great start. let's make a trial test (from the beginning to the end) and develop some figures and we'll know what is to improve for the next round. skype is a good idea

alexruiz95 commented 4 years ago

Sounds good! Are you available for a skype chat tomorrow?

alexlib commented 4 years ago

Sounds good! Are you available for a skype chat tomorrow?

yes, 9pm IL time sounds reasonable if it works for you

alexruiz95 commented 4 years ago

Could we do 12:00 PM EST US (Florida) which would be 7:00 PM your time?

alexlib commented 4 years ago

Could we do 12:00 PM EST US (Florida) which would be 7:00 PM your time?

not tomorrow. too early. another day? Thursday ?

alexruiz95 commented 4 years ago

Yeah, I can do Thursday. I prefer to meet between 10am-5pm. I'll try my best to accommodate. We can always do 2:00 PM EST US (Florida) which would be 9:00 PM your time if that's better(:

alexlib commented 4 years ago

Thursday 2pm EST US = 9pm IL is fine @alexruiz95

alexruiz95 commented 4 years ago

Sounds good TY!

samikbhattacharya commented 4 years ago

Alex, Can you confirm that the JHU database that you are using belongs to homogenous turbulence case? Samik

alexlib commented 4 years ago

I confirm. this is mentioned here https://journals.aps.org/prl/supplemental/10.1103/PhysRevLett.120.244502/SM.pdf