field mapping by BMAPXY
Moderators: cyao, michael_borland
-
- Posts: 11
- Joined: 09 Aug 2023, 09:57
field mapping by BMAPXY
Dear Michael,
I am trying to do field mapping using BMAPXY element. I chose one quadrupole as
q22: bmapxy,l=0.180000,strength=5.255178,filename="map1.sdds",method="non-adaptive",accuracy=0.00001
I converted the map file to sdds as an attached file. When I ran the code I faced this problem:
"Tracking 11249 particles in total for matrix determination
Computing tracking-based matrix for BMAPXY Q22#1
file map1.sdds for BMAPXY element doesn't have correct structure or amount of data
nx = 7, ny=0"
To solve this problem I used sorting comment
"sddssort fieldFile -column=y,incr -column=x,incr"
but the result of running the code showed an "invalid particle..."
After 24 hours I checked the running command and found that the code is running without result! so I poused it.
Could you please give me an idea of what is the problem?
I am a beginner in elegant and did not find an example or something that could help me.
Thank you in advance.
Best regards
I am trying to do field mapping using BMAPXY element. I chose one quadrupole as
q22: bmapxy,l=0.180000,strength=5.255178,filename="map1.sdds",method="non-adaptive",accuracy=0.00001
I converted the map file to sdds as an attached file. When I ran the code I faced this problem:
"Tracking 11249 particles in total for matrix determination
Computing tracking-based matrix for BMAPXY Q22#1
file map1.sdds for BMAPXY element doesn't have correct structure or amount of data
nx = 7, ny=0"
To solve this problem I used sorting comment
"sddssort fieldFile -column=y,incr -column=x,incr"
but the result of running the code showed an "invalid particle..."
After 24 hours I checked the running command and found that the code is running without result! so I poused it.
Could you please give me an idea of what is the problem?
I am a beginner in elegant and did not find an example or something that could help me.
Thank you in advance.
Best regards
- Attachments
-
- map5.rar
- (897.66 KiB) Downloaded 154 times
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: field mapping by BMAPXY
The problem is that our .csv file is corrupted. For example, look at lines 90
,
20007,,
and 20108
and many others like them.
Unfortunately, the programs that convert csv to SDDS are pretty bad at detecting such problems.
--Michael
Code: Select all
-0.01,-0.0018,-0.954122751767E-,01 -0.528339391746,,
20007,
Code: Select all
-0.0001,2.22E-05,0.136713633070E-,02 -0.400245530917E-,,
and 20108
Code: Select all
#VALUE!,#VALUE!,-0.528596975,0.388798795444E-,,
Unfortunately, the programs that convert csv to SDDS are pretty bad at detecting such problems.
--Michael
-
- Posts: 11
- Joined: 09 Aug 2023, 09:57
Re: field mapping by BMAPXY
Dear Michael,
Thank you for your comment.
I find it very useful.
I checked the csv file and revised it manually, so it was a time-consuming process for me. There are more than 150000 data in csv file.
Finally, I sorted the filed file (map.sdds) and ran it again.
At this time, I did not see the error of structures but found a number of invalid particles, as attached file.
Could you please give me an idea of what is the problem?
Thank you, once again.
Best Regards
Thank you for your comment.
I find it very useful.
I checked the csv file and revised it manually, so it was a time-consuming process for me. There are more than 150000 data in csv file.
Finally, I sorted the filed file (map.sdds) and ran it again.
At this time, I did not see the error of structures but found a number of invalid particles, as attached file.
Could you please give me an idea of what is the problem?
Thank you, once again.
Best Regards
- Attachments
-
- map5.rar
- (1.36 MiB) Downloaded 174 times
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: field mapping by BMAPXY
The CSV file is still not quite right.
You have 202 distinct x values. Most are separated by 0.1 mm and have 201 occurrences. However, the value 0 appears 7 times and the value 2.22e-15 appears 201 times.
You have 203 distinct y values. Most are again separated by 0.1 mm and have 201 occurrences. However, the value 0 appears 7 times, the value 2.22e-15 appears 1 time, and the value 2.22e-5 appears 200 times.
--Michael
You have 202 distinct x values. Most are separated by 0.1 mm and have 201 occurrences. However, the value 0 appears 7 times and the value 2.22e-15 appears 201 times.
You have 203 distinct y values. Most are again separated by 0.1 mm and have 201 occurrences. However, the value 0 appears 7 times, the value 2.22e-15 appears 1 time, and the value 2.22e-5 appears 200 times.
--Michael
-
- Posts: 11
- Joined: 09 Aug 2023, 09:57
Re: field mapping by BMAPXY
Dear Michael,
Thank you for your comment.
So it is needed to correct the csv file. I'll try it.
Thank you once again.
Best Regards
Thank you for your comment.
So it is needed to correct the csv file. I'll try it.
Thank you once again.
Best Regards
-
- Posts: 11
- Joined: 09 Aug 2023, 09:57
Re: field mapping by BMAPXY
Dear Michael,
During working with BMAPXY, I was not able to map the quadrupole field using this function.
As a result, I made changes in my ling CSV file (as attached "small1 or 2").
Unfortunately, I cannot do field mapping yet.
In small1.csv, there are 4 columns (X, Y, Bx, By), and in small2.csv, there are 6 columns, including ix, it, x, y, Bx, and By.
When I run map.ele 0 particle is presented after 200 turns, and when I run twiss calculation, I cannot find the tune. It means my map does not work. So could you help me, please?
Best Regards,
During working with BMAPXY, I was not able to map the quadrupole field using this function.
As a result, I made changes in my ling CSV file (as attached "small1 or 2").
Unfortunately, I cannot do field mapping yet.
In small1.csv, there are 4 columns (X, Y, Bx, By), and in small2.csv, there are 6 columns, including ix, it, x, y, Bx, and By.
When I run map.ele 0 particle is presented after 200 turns, and when I run twiss calculation, I cannot find the tune. It means my map does not work. So could you help me, please?
Best Regards,
- Attachments
-
- new map.rar
- (3.42 KiB) Downloaded 171 times
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: field mapping by BMAPXY
I converted small2.csv to SDDS. The range of data is quite small (+/-0.01mm), so there's hardly any room for the beam to move. Also, the grid is only 5x5, so the interpolation may not work well.
Your data needs to cover the range of motion of the beam and have sufficient points in each dimension, e.g., 25x25 or more would be good.
--Michael
Your data needs to cover the range of motion of the beam and have sufficient points in each dimension, e.g., 25x25 or more would be good.
--Michael
-
- Posts: 11
- Joined: 09 Aug 2023, 09:57
Re: field mapping by BMAPXY
Dear Michael,
Thank you for your comment.
I have a 40401*4 grid, including x,y, Bx, and By.
I choose 25 or even 50 rows of data and make another grid to do field mapping with bmapxy.
I hope the grid works this time.
Best Regards
Thank you for your comment.
I have a 40401*4 grid, including x,y, Bx, and By.
I choose 25 or even 50 rows of data and make another grid to do field mapping with bmapxy.
I hope the grid works this time.
Best Regards