Generate XDS.INP: Difference between revisions

→‎The script: fix sed error for Mac, which does not support \|
(→‎The script: fix sed error for Mac, which does not support \|)
Line 142: Line 142:
# revision 1.15 . KD 22/05/2023 fix bug with second argument leading to usage message. Updating links.
# revision 1.15 . KD 22/05/2023 fix bug with second argument leading to usage message. Updating links.
# revision 1.16 . KD 26/05/2023 fix bug on Mac for Pilatus CBF missing two lines
# revision 1.16 . KD 26/05/2023 fix bug on Mac for Pilatus CBF missing two lines
REVISION="1.16 (26-May-2023)"
# revision 1.17 . JMK 31/05/2023 fix sed error for Mac, where \| is not supported
REVISION="1.17 (31-May-2023)"


#
#
Line 258: Line 259:
if [ "$is_h5" == 0 ]; then
if [ "$is_h5" == 0 ]; then
  # extract strings from binary file header, removing leading '#' (Pilatus) and trailing ';' (CBF)
  # extract strings from binary file header, removing leading '#' (Pilatus) and trailing ';' (CBF)
  strings $FIRSTFRAME | head -400 | sed 's/^ *#\|; *$//;' >tmp2
  strings $FIRSTFRAME | head -400 | sed 's/^ *#//;s/; *$//;' >tmp2
  # TODO: whenever FIRSTFRAME is used below, it should be copied to tmp2 (using IFS as above), and tmp2 should be used instead
  # TODO: whenever FIRSTFRAME is used below, it should be copied to tmp2 (using IFS as above), and tmp2 should be used instead
  # this was done for "mccd", but still has to be done for the "raxis" detector types
  # this was done for "mccd", but still has to be done for the "raxis" detector types
Line 520: Line 521:
elif [ "$DET" == "pilatus" ]; then
elif [ "$DET" == "pilatus" ]; then
   echo Data from a Pilatus detector
   echo Data from a Pilatus detector
  sed s/#// tmp2 > tmp1                                                   
  mv tmp1 tmp2
   OVERLOAD=1048574
   OVERLOAD=1048574
   SEPMIN=4
   SEPMIN=4
27

edits