Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Hi, I just tried to "answer" a post and when I hit the "post" button I found out that the message was deleted. I find it not nice to erase a post. People might have already read it and spend time on it. If it was a mistake or if you have thought of things through and you don't want an answer anymore, simply answer you own post with a "sorry, don't need this anymore". [edit: I'm not pissed or anything, I'm just trying to make a point that it is not a drama to have a post out there that you don't need anymore] Anyway, if anybody *still* is interested, here is my answer to the post (unfortunately I did not copy the original message: the poster wanted to compare structures): Good evening, there are a lot of ways of tackling this. But generally with structures you have to go through element by element. You may google compare structures and find a few solutions/suggestions on the group. One other way of doing this (probably computationally more expensive, but slightly easier to understand) is to use hashes (http://www.exelisvis.com/docs/HASH.html). So for each structure you generate a hash: h1 = hash(myStruct1, /extract) h2 = hash(myStruct2, /extract) then you can compare with the EQ or NE operators to check which values are equal or not equal. The result is a list. Here you will find an example: http://www.exelisvis.com/docs/HASH.html#Comparing Notice that you need IDL >8.0. I hope it helps, Helder
On Wednesday, May 27, 2015 at 11:08:17 AM UTC-5, Helder wrote: > Hi, > I just tried to "answer" a post and when I hit the "post" button I found out that the message was deleted. I find it not nice to erase a post. People might have already read it and spend time on it. If it was a mistake or if you have thought of things through and you don't want an answer anymore, simply answer you own post with a "sorry, don't need this anymore". > [edit: I'm not pissed or anything, I'm just trying to make a point that it is not a drama to have a post out there that you don't need anymore] > > Anyway, if anybody *still* is interested, here is my answer to the post (unfortunately I did not copy the original message: the poster wanted to compare structures): > > > Good evening, > there are a lot of ways of tackling this. But generally with structures you have to go through element by element. You may google compare structures and find a few solutions/suggestions on the group. > One other way of doing this (probably computationally more expensive, but slightly easier to understand) is to use hashes (http://www.exelisvis.com/docs/HASH.html). So for each structure you generate a hash: > h1 = hash(myStruct1, /extract) > h2 = hash(myStruct2, /extract) > then you can compare with the EQ or NE operators to check which values are equal or not equal. The result is a list. Here you will find an example: > http://www.exelisvis.com/docs/HASH.html#Comparing > > Notice that you need IDL >8.0. > > I hope it helps, > Helder The astronomy library has COMPARE_STRUCT that does this well: http://idlastro.gsfc.nasa.gov/ftp/pro/structure/compare_stru ct.pro -Jeremy.
On Wednesday, May 27, 2015 at 6:08:17 PM UTC+2, Helder wrote: > Hi, > I just tried to "answer" a post and when I hit the "post" button I found out that the message was deleted. I find it not nice to erase a post. People might have already read it and spend time on it. If it was a mistake or if you have thought of things through and you don't want an answer anymore, simply answer you own post with a "sorry, don't need this anymore". > [edit: I'm not pissed or anything, I'm just trying to make a point that it is not a drama to have a post out there that you don't need anymore] > > Anyway, if anybody *still* is interested, here is my answer to the post (unfortunately I did not copy the original message: the poster wanted to compare structures): > > > Good evening, > there are a lot of ways of tackling this. But generally with structures you have to go through element by element. You may google compare structures and find a few solutions/suggestions on the group. > One other way of doing this (probably computationally more expensive, but slightly easier to understand) is to use hashes (http://www.exelisvis.com/docs/HASH.html). So for each structure you generate a hash: > h1 = hash(myStruct1, /extract) > h2 = hash(myStruct2, /extract) > then you can compare with the EQ or NE operators to check which values are equal or not equal. The result is a list. Here you will find an example: > http://www.exelisvis.com/docs/HASH.html#Comparing > > Notice that you need IDL >8.0. > > I hope it helps, > Helder I agree with you, just some clarification: posts can be deleted from Google groups, but the original post remains there on the news servers. This is an extra argument for not erasing posts :-) regards, Lajos