Discussion List Archives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Imgcif-l] CBF adds new lines to character data

  • To: The Crystallographic Binary File and its imgCIF application to image data <imgcif-l@iucr.org>
  • Subject: [Imgcif-l] CBF adds new lines to character data
  • From: Michael Blum <blum@rayonix.com>
  • Date: Wed, 15 Oct 2008 18:16:05 -0500
Hi Herb et al,

For testing our production of CBF files, I am converting our marccd  
frames to CBF,  converting the CBF back to marccd, and
then doing a "diff" between the original and final marccd frame  
files.  All interactions with the CBF file and data are done using
CBFlib.

I am having trouble getting some string values  back intact.

Long comments  (strings) that are written to the CBF using  
set_value()  get newlines  (or carriage returns) added to them in the  
CBF file.
When the text is extracted again, using cbf_get_value(),  it has the  
extra newlines it.  The original strings may or may not have their own  
newlines.  The added newlines seem to be "escaped', using '\', but  
neither the escapes nor the  escaped newlines  get removed from the  
string.

This a little more than just a cosmetic issue, as sometimes we have  
formatted text in the comments, with columns that line up and
we would like to get the text back in a readable format.


two real examples using CBFlib v0.7.9 on a redhat 5.2 linux box.
( BTW, CBFlib 0.7.9 writes "0.7.8" into the header prologue! )

--------------------------------
This is OK:

C-string input:
"file comments for a blank image on the marMosaic simulator with dummy  
values"

CBF result:  (with cbf_set_value() )
_diffrn_data_frame.details^M
  'file comments for a blank image on the marMosaic simulator with  
dummy values'^M
^M

C-string result of reading CBF:  (with cbf_get_value())
"file comments for a blank image on the marMosaic simulator with dummy  
values"
--------------------------------
--------------------------------
This is NOT OK:

C-string input:
"dataset comments for a blank image on the marMosaic simulator with  
dummy values"

CBF result:  ( of cbf_set_value() )
_diffrn_measurement.details^M
;\
dataset comments for a blank image on the marMosaic simulator with\
  dummy values\
;

C-string result of parsing CBF:  (with cbf_get_value())
"\
dataset comments for a blank image on the marMosaic simulator with\
  dummy values\"

--------------------------------



Note NEW Company name and email address!
_______________
Michael L. Blum                    Toll Free: 877-627-XRAY (627-9729)
Rayonix, LLC                        Tel: 847-869-1548
1880 Oak Avenue                 Fax: 847-869-1587
Evanston, IL  60201              Email: blum@rayonix.com
USA                                       WWW: www.rayonix.com





_______________________________________________
imgcif-l mailing list
imgcif-l@iucr.org
http://scripts.iucr.org/mailman/listinfo/imgcif-l

Reply to: [list | sender only]
International Union of Crystallography

Scientific Union Member of the International Science Council (admitted 1947). Member of CODATA, the ISC Committee on Data. Partner with UNESCO, the United Nations Educational, Scientific and Cultural Organization in the International Year of Crystallography 2014.

International Science Council Scientific Freedom Policy

The IUCr observes the basic policy of non-discrimination and affirms the right and freedom of scientists to associate in international scientific activity without regard to such factors as ethnic origin, religion, citizenship, language, political stance, gender, sex or age, in accordance with the Statutes of the International Council for Science.