Exclude data range from XDS ASCII.HKL: Difference between revisions

From XDSwiki
Jump to navigation Jump to search
mNo edit summary
(remove program source - functionality is now in XDS)
Line 1: Line 1:
This is a jiffy (binaries for [https://{{SERVERNAME}}/pub/linux_bin/exclude_data_range_from_XDS_ASCII.HKL Linux] and [https://{{SERVERNAME}}/pub/mac_bin/exclude_data_range_from_XDS_ASCII.HKL Mac]) that removes reflections of a given frame range. The first and last frame of the range must be input. The program reads XDS_ASCII.HKL and writes XDS_ASCII.HKL.exclude_data_range . If several frame ranges should be removed, the program can be run repeatedly - but of course then the files must be renamed.
This program is obsolete - the [https://xds.mr.mpg.de/html_doc/Release_Notes.html Release notes] say:
 
<pre>BUILT=20210323
Bad frames may e.g. be identified by [[xdscc12]].
The input parameter EXCLUDE_DATA_RANGE= is provided now to the CORRECT step as well. This allows exclusion of reflections recorded by specific images without rerunning the INTEGRATE step.</pre>
<pre>
! purpose: remove data on bad frames from XDS_ASCII.HKL
! Kay Diederichs July 3, 2019
PROGRAM main
      CHARACTER line*512
      INTEGER inunit,outunit,first,last,ier,ih,ik,il
      REAL :: intensity,sigma,xd,yd,zd=0
     
      OPEN(NEWUNIT=inunit,FILE='XDS_ASCII.HKL',STATUS='old',ACTION='READ')
      PRINT*,'first and last frame of range that should be excluded?'
      READ*,first,last
      OPEN(NEWUNIT=outunit,FILE='XDS_ASCII.HKL.exclude_data_range',STATUS='unknown',ACTION='WRITE')
 
! copy only lines that either cannot be read, or where ZD < first-1 or ZD > last
! (keep in mind that reflections of frame i have a ZD between i-1 and i)
      DO
        READ(inunit,'(a)',end=99) line
        READ(line,*,iostat=ier) ih,ik,il,intensity,sigma,xd,yd,zd
        IF (ier==0 .AND. zd > first-1 .AND. zd < last) CYCLE
        WRITE(outunit,'(a)') TRIM(line)
      END DO
  99 STOP
END PROGRAM main
</pre>

Revision as of 11:23, 22 August 2021

This program is obsolete - the Release notes say:

BUILT=20210323
The input parameter EXCLUDE_DATA_RANGE= is provided now to the CORRECT step as well. This allows exclusion of reflections recorded by specific images without rerunning the INTEGRATE step.