<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_bshow__ctf_8tcl">
<title>/Users/bernard/b20/bsoft/tcltk/bshow_ctf.tcl File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/tcltk/bshow_ctf.tcl</primary></indexterm>
<para>

<para>Procedures to do CTF fitting. </para>
 
</para>
<simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a3528bddb25ae5d70c8d669958efa8654">CTF</link> currimg</para>

<para>Dialog box to manipulate CTF parameters. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1ac59414dc4f2d02bb9462ed61a97a50a0">setCTFPixelSize</link> theimg</para>

<para>Dialog box to set the pixel size for CTF fitting. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a4e9793dcc6867d83f8034fe56ca76455">setPixelSize_and_DestroyWindow</link> w theimg</para>

<para>Sets the pixel size. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a4bf1d9631bb5b3e631da925172184d76">setStep</link> theimg</para>

<para>Sets the reciprocal space step size. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a995bb01faeff6f0da34febd23f109c87">updateCTF</link></para>

<para>Updates all the CTF curves. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a05bc69a28f287df8255b686ce82afea9">setDefocusAverage</link> def_avg</para>

<para>Sets the defocus average. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a55d1fab4acb5daf86c05fc5fc91a62ff">setDefocusDeviation</link> def_dev</para>

<para>Sets the defocus deviation. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a9a7893ded6cd459c28c3e52082dc712e">setAstigmatismAngle</link> ast_ang</para>

<para>Sets the astigmatism angle. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a225d02c30a7558f853b4d54bcd1ffa00">getWavelength</link></para>

<para>Calculates the wavelength. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a86c9d640692e3e42de1103d615ffb56f">getFirstZero</link></para>

<para>Returns the first zero at the average defocus. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1aacf0efe07c50e5d0dd9b0f47342447d5">getZeroes</link></para>

<para>Returns all the zeroes at the average defocus. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a945cb02f18bc0936064df83694edd44e">calcRPS</link></para>

<para>Calculates the radial power spectrum. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a681cf42349d2d55dfc52c1722ead0d2e">calcCTF</link></para>

<para>Calculates the contrast transfer function. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a78c810c2d4d2cac344055a971d6eaea5">calcR</link></para>

<para>Returns the RMSD between the experimental and calculated RPS curves. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1aa2eb813184ba841464984783a5f9093b">autoCTFfit</link> <link linkend="_rw_d_m_8cpp_1a2f48c9e23195864af2581edd4f60917e">level</link></para>

<para>Attempts an automatic fit of the baseline, envelope and CTF functions. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1ab3e790b3968a7a351ec0cd20713e05cf">drawEllipse</link> theimg</para>

<para>Draws a number of ellipses at the CTF zeroes. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a8711aa8627ba0ac465dda17a5cdb1bd5">drawCTF</link></para>

<para>Draws four curves: baseline, envelope, CTF and RPS. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1ae3f314fc198c1234c6ff013826afc2f8">showFrequency</link> c x y</para>

<para>Shows the spatial frequency at that point where the mouse is moved. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a4505bf6b39deaf7f52887ab70bc7f16d">writeCTF</link></para>

<para>Saves CTF curves to a text file. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a7638ef5a3bb939b71e812fcc46805648">getCTFparam</link></para>

<para>Updates CTF parameters from the micrograph parameters in memory. </para>
</listitem>
            <listitem><para><link linkend="_bshow__ctf_8tcl_1a9b3eddd8f4bafe8696b7657df8daef75">setCTFparam</link></para>

<para>Saves CTF parameters to the micrograph parameters in memory. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Procedures to do CTF fitting. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20020729 </para>

<para>Modified: 20170712 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_bshow__ctf_8tcl_1aa2eb813184ba841464984783a5f9093b"/>    <section>
    <title>autoCTFfit()</title>
<indexterm><primary>autoCTFfit</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>autoCTFfit</secondary></indexterm>
<para><computeroutput>autoCTFfit level </computeroutput></para><para>

<para>Attempts an automatic fit of the baseline, envelope and CTF functions. </para>
</para>
<para>
Definition at line 558 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a681cf42349d2d55dfc52c1722ead0d2e"/>    <section>
    <title>calcCTF()</title>
<indexterm><primary>calcCTF</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>calcCTF</secondary></indexterm>
<para><computeroutput>calcCTF</computeroutput></para><para>

<para>Calculates the contrast transfer function. </para>
</para>
<para>
Definition at line 472 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a78c810c2d4d2cac344055a971d6eaea5"/>    <section>
    <title>calcR()</title>
<indexterm><primary>calcR</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>calcR</secondary></indexterm>
<para><computeroutput>calcR</computeroutput></para><para>

<para>Returns the RMSD between the experimental and calculated RPS curves. </para>
</para>
<para>
Definition at line 509 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a945cb02f18bc0936064df83694edd44e"/>    <section>
    <title>calcRPS()</title>
<indexterm><primary>calcRPS</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>calcRPS</secondary></indexterm>
<para><computeroutput>calcRPS</computeroutput></para><para>

<para>Calculates the radial power spectrum. </para>
</para>
<para>
Definition at line 449 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a3528bddb25ae5d70c8d669958efa8654"/>    <section>
    <title>CTF()</title>
<indexterm><primary>CTF</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>CTF</secondary></indexterm>
<para><computeroutput>CTF currimg </computeroutput></para><para>

<para>Dialog box to manipulate CTF parameters. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>currimg</entry>
                                <entry>
<para>Image identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 36 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a8711aa8627ba0ac465dda17a5cdb1bd5"/>    <section>
    <title>drawCTF()</title>
<indexterm><primary>drawCTF</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>drawCTF</secondary></indexterm>
<para><computeroutput>drawCTF</computeroutput></para><para>

<para>Draws four curves: baseline, envelope, CTF and RPS. </para>
</para>
<para>
Definition at line 667 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1ab3e790b3968a7a351ec0cd20713e05cf"/>    <section>
    <title>drawEllipse()</title>
<indexterm><primary>drawEllipse</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>drawEllipse</secondary></indexterm>
<para><computeroutput>drawEllipse theimg </computeroutput></para><para>

<para>Draws a number of ellipses at the CTF zeroes. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>theimg</entry>
                                <entry>
<para>Image identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 603 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a7638ef5a3bb939b71e812fcc46805648"/>    <section>
    <title>getCTFparam()</title>
<indexterm><primary>getCTFparam</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>getCTFparam</secondary></indexterm>
<para><computeroutput>getCTFparam</computeroutput></para><para>

<para>Updates CTF parameters from the micrograph parameters in memory. </para>
</para>
<para>
Definition at line 817 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a86c9d640692e3e42de1103d615ffb56f"/>    <section>
    <title>getFirstZero()</title>
<indexterm><primary>getFirstZero</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>getFirstZero</secondary></indexterm>
<para><computeroutput>getFirstZero</computeroutput></para><para>

<para>Returns the first zero at the average defocus. </para>
</para>
<para>
Definition at line 411 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a225d02c30a7558f853b4d54bcd1ffa00"/>    <section>
    <title>getWavelength()</title>
<indexterm><primary>getWavelength</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>getWavelength</secondary></indexterm>
<para><computeroutput>getWavelength</computeroutput></para><para>

<para>Calculates the wavelength. </para>
</para>
<para>
Definition at line 404 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1aacf0efe07c50e5d0dd9b0f47342447d5"/>    <section>
    <title>getZeroes()</title>
<indexterm><primary>getZeroes</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>getZeroes</secondary></indexterm>
<para><computeroutput>getZeroes</computeroutput></para><para>

<para>Returns all the zeroes at the average defocus. </para>
</para>
<para>
Definition at line 424 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a9a7893ded6cd459c28c3e52082dc712e"/>    <section>
    <title>setAstigmatismAngle()</title>
<indexterm><primary>setAstigmatismAngle</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>setAstigmatismAngle</secondary></indexterm>
<para><computeroutput>setAstigmatismAngle ast_ang </computeroutput></para><para>

<para>Sets the astigmatism angle. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>ast_ang</entry>
                                <entry>
<para>Astigmatism angle in degrees. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 391 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a9b3eddd8f4bafe8696b7657df8daef75"/>    <section>
    <title>setCTFparam()</title>
<indexterm><primary>setCTFparam</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>setCTFparam</secondary></indexterm>
<para><computeroutput>setCTFparam</computeroutput></para><para>

<para>Saves CTF parameters to the micrograph parameters in memory. </para>
</para>
<para>
Definition at line 878 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1ac59414dc4f2d02bb9462ed61a97a50a0"/>    <section>
    <title>setCTFPixelSize()</title>
<indexterm><primary>setCTFPixelSize</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>setCTFPixelSize</secondary></indexterm>
<para><computeroutput>setCTFPixelSize theimg </computeroutput></para><para>

<para>Dialog box to set the pixel size for CTF fitting. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>theimg</entry>
                                <entry>
<para>Image identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 274 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a05bc69a28f287df8255b686ce82afea9"/>    <section>
    <title>setDefocusAverage()</title>
<indexterm><primary>setDefocusAverage</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>setDefocusAverage</secondary></indexterm>
<para><computeroutput>setDefocusAverage def_avg </computeroutput></para><para>

<para>Sets the defocus average. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>def_avg</entry>
                                <entry>
<para>Defocus average. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 363 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a55d1fab4acb5daf86c05fc5fc91a62ff"/>    <section>
    <title>setDefocusDeviation()</title>
<indexterm><primary>setDefocusDeviation</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>setDefocusDeviation</secondary></indexterm>
<para><computeroutput>setDefocusDeviation def_dev </computeroutput></para><para>

<para>Sets the defocus deviation. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>def_dev</entry>
                                <entry>
<para>Defocus deviation. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 377 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a4e9793dcc6867d83f8034fe56ca76455"/>    <section>
    <title>setPixelSize_and_DestroyWindow()</title>
<indexterm><primary>setPixelSize_and_DestroyWindow</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>setPixelSize_and_DestroyWindow</secondary></indexterm>
<para><computeroutput>setPixelSize_and_DestroyWindow w theimg </computeroutput></para><para>

<para>Sets the pixel size. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>w</entry>
                                <entry>
<para>the window to destroy. </para>
</entry>
                            </row>
                            <row>
                                <entry>theimg</entry>
                                <entry>
<para>Image identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 312 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a4bf1d9631bb5b3e631da925172184d76"/>    <section>
    <title>setStep()</title>
<indexterm><primary>setStep</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>setStep</secondary></indexterm>
<para><computeroutput>setStep theimg </computeroutput></para><para>

<para>Sets the reciprocal space step size. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>theimg</entry>
                                <entry>
<para>Image identifier. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 326 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1ae3f314fc198c1234c6ff013826afc2f8"/>    <section>
    <title>showFrequency()</title>
<indexterm><primary>showFrequency</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>showFrequency</secondary></indexterm>
<para><computeroutput>showFrequency c x y </computeroutput></para><para>

<para>Shows the spatial frequency at that point where the mouse is moved. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>c</entry>
                                <entry>
<para>Canvas object. </para>
</entry>
                            </row>
                            <row>
                                <entry>x</entry>
                                <entry>
<para></para>
</entry>
                            </row>
                            <row>
                                <entry>y</entry>
                                <entry>
<para>Coordinates on the canvas. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 762 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a995bb01faeff6f0da34febd23f109c87"/>    <section>
    <title>updateCTF()</title>
<indexterm><primary>updateCTF</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>updateCTF</secondary></indexterm>
<para><computeroutput>updateCTF</computeroutput></para><para>

<para>Updates all the CTF curves. </para>
</para>
<para>
Definition at line 336 of file bshow_ctf.tcl.</para>
    </section><anchor xml:id="_bshow__ctf_8tcl_1a4505bf6b39deaf7f52887ab70bc7f16d"/>    <section>
    <title>writeCTF()</title>
<indexterm><primary>writeCTF</primary><secondary>bshow_ctf.tcl</secondary></indexterm>
<indexterm><primary>bshow_ctf.tcl</primary><secondary>writeCTF</secondary></indexterm>
<para><computeroutput>writeCTF</computeroutput></para><para>

<para>Saves CTF curves to a text file. </para>
</para>
<para>
Definition at line 774 of file bshow_ctf.tcl.</para>
</section>
</section>
</section>
