<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Vincent,</p>
    <p>I don't think Reflection File Editor can do that but I just wrote
      a cctbx based script to do that. Save lines below (between ****)
      into a file convert.py:</p>
    <p>****</p>
    <p>from iotbx import mtz<br>
      from iotbx import reflection_file_reader<br>
      <br>
      def run(file_name = "1yjp_refine_001.mtz"):<br>
        miller_arrays =
      reflection_file_reader.any_reflection_file(file_name =<br>
          file_name).as_miller_arrays()<br>
        mtz_dataset = None<br>
        for ma in miller_arrays[1:]:<br>
          label = ma.info().label_string()<br>
          if "," in label: label = label[:label.index(",")]<br>
          if mtz_dataset is None: <br>
            mtz_dataset = ma.as_mtz_dataset(column_root_label = label)<br>
          else:<br>
            mtz_dataset.add_miller_array(ma, column_root_label = label)<br>
        mtz_dataset.mtz_object().write("output.mtz")<br>
      <br>
      if __name__ == '__main__':<br>
        run()<br>
    </p>
    <p>****</p>
    <p>then put the correct file name instead of 1yjp_refine_001.mtz and
      run</p>
    <p>phenix.python convert.py</p>
    <p>The output output.mtz file will have all the arrays in one data
      block.</p>
    <p>Good luck!<br>
      Pavel<br>
      <br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 9/28/23 07:36, vincent Chaptal
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:9a1eaa17-55da-c8f6-4c2b-fb63faf9034d@ibcp.fr">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <font size="4"><font face="monospace">Hi, <br>
          <br>
          I have a reflection file generated by phenix.refine, which
          contains  HKL, I, Rfree, SIGI, Fs..., Fmodel... and map
          coeffs. All these arrays are placed in several dataset#. <br>
          I would like to place them all in a single Dataset#. Is it
          possible to do that using the reflection file editor? I've
          tried to modify the output with "edit arrays" but I can't
          figure out how to do that? <br>
          <br>
          Thank you.<br>
          Best<br>
          Vincent<br>
          <br>
        </font></font>
      <div class="moz-signature">-- <br>
        <meta http-equiv="Content-Type"
          content="text/html; charset=UTF-8">
        <meta http-equiv="Content-Style-Type" content="text/css">
        <title></title>
        <meta name="Generator" content="Cocoa HTML Writer">
        <meta name="CocoaVersion" content="1671.6">
        <style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #000000; -webkit-text-stroke: #000000}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #000000; -webkit-text-stroke: #000000; min-height: 14.0px}span.s1 {font-kerning: none}</style>
        <p class="p1"><span class="s1">Vincent Chaptal, PhD</span></p>
        <p class="p1"><span class="s1">Director of GdR APPICOM</span></p>
        <p class="p1"><span class="s1">Drug Resistance and Membrane
            Proteins Lab</span></p>
        <p class="p2"><span class="s1"></span><br>
        </p>
        <p class="p1"><span class="s1">MMSB -UMR5086</span></p>
        <p class="p1"><span class="s1">7 passage du Vercors<span
              class="Apple-converted-space"> </span></span></p>
        <p class="p1"><span class="s1">69007 LYON</span></p>
        <p class="p1"><span class="s1">FRANCE</span></p>
        <p class="p1"><span class="s1">+33 4 37 65 29 01</span></p>
        <p class="p1"><span class="s1"><a class="moz-txt-link-freetext"
              href="http://www.appicom.cnrs.fr" moz-do-not-send="true">http://www.appicom.cnrs.fr</a></span></p>
        <p class="p1"><span class="s1"><a class="moz-txt-link-freetext"
              href="http://mmsb.cnrs.fr/en/" moz-do-not-send="true">http://mmsb.cnrs.fr/en/</a></span></p>
        <p class="p1"><span class="s1"><br>
          </span></p>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
phenixbb mailing list
<a class="moz-txt-link-abbreviated" href="mailto:phenixbb@phenix-online.org">phenixbb@phenix-online.org</a>
<a class="moz-txt-link-freetext" href="http://phenix-online.org/mailman/listinfo/phenixbb">http://phenix-online.org/mailman/listinfo/phenixbb</a>
Unsubscribe: <a class="moz-txt-link-abbreviated" href="mailto:phenixbb-leave@phenix-online.org">phenixbb-leave@phenix-online.org</a></pre>
    </blockquote>
  </body>
</html>