messlinger / cnfconv

Canberra CNF to ASCII file conversion
16 stars 12 forks source link

more information about the cnf #4

Open bascodex opened 1 year ago

bascodex commented 1 year ago

Hello Messlinger, first of all, thank you for this program I just discovered yesterday. that's fantastic. It works pefectly and I plan to use it on G2K generated cnf for alpha spectrometry.

Do you think it could be possible to extract more info about the cnf file such as the detector used for the measurement ?

Kind regards,

mesotes commented 1 year ago

Hi, looking into the file format description, the String you are searching is found in the parameter section.

0x30 + [0x22] + 0x30C string[8] detector type

So yes, it is possible to read out this information if it is given and it is easy to implement. Not all data is printed out as it wasn't needed for our purpose.

I'll be offline next two weeks and could do this in Septembet if it isn't urgent. Maybe a GPL licence would be nice @messlinger

messlinger commented 1 year ago

Hi, I am currently on vacation. I will look at this, when I come back home.

See you Stephan

bascodex commented 1 year ago

Hi, looking into the file format description, the String you are searching is found in the parameter section.

0x30 + [0x22] + 0x30C string[8] detector type

So yes, it is possible to read out this information if it is given and it is easy to implement. Not all data is printed out as it wasn't needed for our purpose.

I'll be offline next two weeks and could do this in Septembet if it isn't urgent. Maybe a GPL licence would be nice @messlinger

thank you for your answer both of you. Indeed I did'nt noticed I could find more info in the file format description. Do you know what "data source" refers to in the parameter section ?

Also, would you mind adding these info: 0x30 + [0x22] + 0x30C string[8] detector type 0x30 + 0x2A string[16] geometry ID 0x30 + 0xCE string[32] efficiency type 0x30 + 0x80 string[4] measurement mode 0x30 + 0x00 string[16] deposition unit (and deposition time ?) 0x30 + 0x140 string[8] sample preparation 0x30 + 0x76 string[192] background file

That would be fantastic.

kind regards,

Bascodex (Kevin)

messlinger commented 1 year ago

Hi Kevin, Hi Marek,

I am back at my computer now. It seems you have dug out some more cnf file content. Do you have a source for these, or did you reverse-engineer the format yourself? Can you provide me with some sample files which contain these strings? Do these have a defined function within the original software or do they just contain arbitrary user defined text?

I am not really sure about the meaning of the "data source" parameter. If I remember correctly, it was some user settable data field in the software we used in the students experiment setup I wrote this software for. Unfortunately I have no access to this software anymore, so I can not recheck this.

Do you think it is reasonable to always include all of the parameters in the output file? Or maybe only the parameters that actually contain data?

bascodex commented 1 year ago

Hi Messlinger,

My apologize for the delay..

It seems you have dug out some more cnf file content. Do you have a source for these, or did you reverse-engineer the format yourself?

I'm not very familiar with programming and I actually found the field I need by checking the cnf2txt.c file . These fields correspond to information we currently use in our lab. I can send you two type of cnf file (alpha and gamma) to make a try to see what comes out.

Do these have a defined function within the original software or do they just contain arbitrary user defined text?

I think there are defined function. All the info I mentionned are used in my lab to trace the sample life and can be modified

Do you think it is reasonable to always include all of the parameters in the output file? Or maybe only the parameters that actually contain data?

I would say yes. When I run your program on my files I have some empty fields and I have no problem with that. On contrary, my point of view is to extract the maximum information we could do in order to be as exhaustive as possible. What do you think ?

see you, Kévin

messlinger commented 1 year ago

Hi Kevin, I might find some time to add the additional fields to the ascii output during the upcoming week.

Please send me some of your cnf files with known data contained in the respective paramter fields, together with a list of what you wrote into the fields and how the fields are named in your software. The text content should fill the complete maximum length of the fields, so that I can verify the length.

bascodex commented 1 year ago

Hi Kevin, I might find some time to add the additional fields to the ascii output during the upcoming week.

Please send me some of your cnf files with known data contained in the respective paramter fields, together with a list of what you wrote into the fields and how the fields are named in your software. The text content should fill the complete maximum length of the fields, so that I can verify the length.

Temp.zip

Hi messlinger. Please find 4 types of cnf files we have in our lab. Kind regards !

messlinger commented 1 year ago

Kevin, can you please specify the exact text that you expect in the parameter fields you requested? Preferably, use the software you are using in your lab to write the CNF files and fill the fields with some known text to the full possible width.