(************** Content-type: application/mathematica **************
                     CreatedBy='Mathematica 5.0'

                    Mathematica-Compatible Notebook

This notebook can be used with any Mathematica-compatible
application, such as Mathematica, MathReader or Publicon. The data
for the notebook starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do
one of the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the
  application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing
the word CacheID, otherwise Mathematica-compatible applications may
try to use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info@wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
*******************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[     19345,        402]*)
(*NotebookOutlinePosition[     19990,        424]*)
(*  CellTagsIndexPosition[     19946,        420]*)
(*WindowFrame->Normal*)



Notebook[{
Cell[BoxData[
    \(\(\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\( (*\ 
      Routine\ 1\ *) \)\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\)\)], \
"Input"],

Cell[BoxData[{
    RowBox[{
      StyleBox[\(Off[General::spell1]\),
        "MR"], 
      StyleBox[";",
        "MR"], 
      " ", \(matx = 
        Input["\<Please enter the x-direction number of pixels in the CCD \
chip:\>"]\), 
      ";", \(maty = 
        Input["\<Please enter the y-direction number of pixels in the CCD \
chip:\>"]\), ";", 
      " ", \(Print["\<CCD chip size (x,y): (\>", matx, "\<,\>", 
        maty, "\<)\>"]\), ";"}], "\[IndentingNewLine]", 
    RowBox[{\(SetDirectory["\<C:\Users\FullDirectoryPathHERE\>"];\), 
      " "}], "\[IndentingNewLine]", \(a = 
        ReadList["\<FILE_NAME_HERE.txt\>", 
          Table[Number, {matx}]];\), "\[IndentingNewLine]", \(ListPlot3D[a, 
      ColorFunction \[Rule] Hue, 
      PlotRange -> {{0, matx}, {0, maty}, {0, 60000}}, 
      ViewPoint \[Rule] {1, 1,  .2}]; mag = Max[a]; 
    Print["\<Peak value (ADU):  \>", mag]\)}], "Input"],

Cell[BoxData[
    \(\(\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\( (*\ 
      Routine\ 2\ *) \)\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\)\)], \
"Input"],

Cell[BoxData[
    \(m = N[IntegerPart[mag/2]]; 
    ListPlot3D[a, ColorFunction \[Rule] Hue, 
      PlotRange -> {{150, 300}, {50, 200}, {0, m}}, 
      ViewPoint \[Rule] { .2, 4, 2}];\)], "Input"],

Cell[BoxData[
    \(\(\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\( (*\ 
      Routine\ 3\ *) \)\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\)\)], \
"Input"],

Cell[BoxData[{
    \(nx1 = Input["\<x1?\>"]; nx2 = Input["\<x2?\>"]; ny1 = Input["\<y1?\>"]; 
    ny2 = Input["\<y2?\>"]; \ 
    Print["\<The chosen working square goes from \>", nx1, "\< to \>", 
      nx2, "\< in the x-axis and from \>", ny1, "\< to \>", 
      ny2, "\< in the y-axis\>"];\), "\[IndentingNewLine]", 
    \(pp2 = 
      ListPlot3D[a, ColorFunction \[Rule] GrayLevel, 
        PlotRange -> {{nx1, nx2}, {ny1, ny2}, {N[m] - 1, N[m]}}, 
        ViewPoint \[Rule] {0, 0, 2}]; 
    anspath = 
      Input["\<Judging by eye, which main direction follows the Polaris path? \
Left-right (1) or Top-down (2)?\>"]; \ 
    If\ [anspath \[Equal] 1, 
      u = Input["\<Please indicate the x-coordinate of the left extremity of \
the path\>"]; 
      t = Input["\<Please indicate the y-coordinate of the left extremity of \
the path\>"]; 
      w = Input["\<Please indicate the x-coordinate of the right extremity of \
the path\>"]; 
      v = Input["\<Please indicate the y-coordinate of the right extremity of \
the path\>"]; 
      Print["\<You have picked the path from (\>", u, "\<,\>", 
        t, "\<) to (\>", w, "\<,\>", v, "\<).\>"], 
      u = Input["\<Please indicate the x-coordinate of the bottom extremity \
of the path\>"]; 
      t = Input["\<Please indicate the y-coordinate of the bottom extremity \
of the path\>"]; 
      w = Input["\<Please indicate the x-coordinate of the top extremity of \
the path\>"]; 
      v = Input["\<Please indicate the y-coordinate of the top extremity of \
the path\>"]; 
      Print["\<You have picked the path from (\>", u, "\<,\>", 
        t, "\<) to (\>", w, "\<,\>", v, "\<).\>"]]; \ 
    pathpoints = {{u, t}, {w, v}}; b = Transpose[a]; \ angyy = 0; angxx = 0; 
    no = 0; inver = 0; angyy = ArcTan[Abs[u - w]/Abs[t - v]]; 
    angxx = Pi/2 - angyy; 
    If[angxx > angyy, no = 1; If[t > v, alter = t; t = v; v = alter]; 
      If[u > w, alter = u; u = w; w = alter], inver = 1; 
      If[t > v, alter = t; t = v; v = alter]; 
      If[u > w, alter = u; u = w; w = alter]];\), "\[IndentingNewLine]", 
    \(If[no == 1, x = u; x1 = u; y = t; d = {}; e = {}; midp = 0; soma = 0; 
      midpoint = {}; i = 0; jset = 0; 
      While[y <= v, 
        While[x < matx + 1, 
          While[b[\([x, y]\)] >= m, d = Append[d, {x, y}]; soma = soma + x; 
            x = x + 1; i = i + 1]; 
          If[i \[NotEqual] 0, jset = jset + 1; \ midp = IntegerPart[soma/i]; 
            midpoint = Append[midpoint, midp]; midp = 0; i = 0; soma = 0, 
            x = x + 1]]; x2 = 0; k = 1; dist1 = 0; dist = matx*2; 
        While[k \[LessEqual] jset, dist1 = Abs[midpoint[\([k]\)] - x1]; \ 
          If[dist1 < dist, x2 = midpoint[\([k]\)]; dist = dist1]; k = k + 1]; 
        If[x1 \[NotEqual] u\  || \ y \[NotEqual] t, \ \ \ While[
            x2 < x1 - 1\  && \ b[\([x2 + 1, y]\)] \[GreaterEqual] m, 
            x2 = x2 + 1]; \ 
          While[x2 > x1 + 1\  && \ b[\([x2 - 1, y]\)] \[GreaterEqual] m, 
            x2 = x2 - 1]; \ e = Append[e, {x2, y}]; x1 = x2, 
          e = Append[e, {x2, y}]; x1 = x2]; y = y + 1; x = 1; i = 0; 
        jset = 0; midpoint = {}], \[IndentingNewLine]y = t; y1 = t; x = u; 
      d = {}; e = {}; midp = 0; soma = 0; midpoint = {}; i = 0; jset = 0; 
      While[x \[LessEqual] w, 
        While[y < maty + 1, 
          While[b[\([x, y]\)] >= m, d = Append[d, {x, y}]; soma = soma + y; 
            y = y + 1; i = i + 1]; 
          If[i \[NotEqual] 0, jset = jset + 1; \ midp = IntegerPart[soma/i]; 
            midpoint = Append[midpoint, midp]; midp = 0; i = 0; soma = 0, 
            y = y + 1]]; y2 = 0; k = 1; dist1 = 0; dist = maty*2; 
        While[k \[LessEqual] jset, dist1 = Abs[midpoint[\([k]\)] - y1]; \ 
          If[dist1 < dist, y2 = midpoint[\([k]\)]; dist = dist1]; k = k + 1]; 
        If[y1 \[NotEqual] t\  || \ x \[NotEqual] u, \ \ \ While[
            y2 < y1 - 1\  && \ b[\([x, y2 + 1]\)] \[GreaterEqual] m, 
            y2 = y2 + 1]; \ 
          While[y2 > y1 + 1\  && \ b[\([x, y2 - 1]\)] \[GreaterEqual] m, 
            y2 = y2 - 1]; \ e = Append[e, {x, y2}]; y1 = y2, 
          e = Append[e, {x, y2}]; y1 = y2]; x = x + 1; y = 1; i = 0; 
        jset = 0; midpoint = {}]]; 
    e1 = ListPlot[d, PlotRange \[Rule] All, PlotStyle -> PointSize[0.013], 
        Frame -> True, Axes -> False, AspectRatio \[Rule] Automatic]; 
    e2 = ListPlot[e, PlotRange \[Rule] All, 
        PlotStyle \[Rule] RGBColor[1, 0, 0], PlotStyle -> PointSize[0.013], 
        Frame -> True, Axes -> False, 
        AspectRatio \[Rule] Automatic];\), "\[IndentingNewLine]", 
    \(le = Length[e]; e; 
    pp1 = ListPlot[pathpoints, PlotRange \[Rule] All, 
        PlotStyle \[Rule] RGBColor[1, 0, 0], PlotStyle -> PointSize[0.013], 
        Frame -> True, Axes -> False, AspectRatio \[Rule] Automatic]; 
    Show[e1, pp1]; Show[pp2]; Show[e1, e2]; anshere = 1; 
    anshere = 
      Input["\<Please confirm (1) that the path extremes are correct (red \
points), comparing with the original plot. If not, write 0.\>"]; \ 
    While[anshere \[Equal] 0, 
      If[anspath \[Equal] 1, 
        u = Input["\<Please indicate the x-coordinate of the left extremity \
of the path\>"]; 
        t = Input["\<Please indicate the y-coordinate of the left extremity \
of the path\>"]; 
        w = Input["\<Please indicate the x-coordinate of the right extremity \
of the path\>"]; 
        v = Input["\<Please indicate the y-coordinate of the right extremity \
of the path\>"]; 
        Print["\<You have picked the path from (\>", u, "\<,\>", 
          t, "\<) to (\>", w, "\<,\>", v, "\<).\>"], 
        u = Input["\<Please indicate the x-coordinate of the bottom extremity \
of the path\>"]; 
        t = Input["\<Please indicate the y-coordinate of the bottom extremity \
of the path\>"]; 
        w = Input["\<Please indicate the x-coordinate of the top extremity of \
the path\>"]; 
        v = Input["\<Please indicate the y-coordinate of the top extremity of \
the path\>"]; 
        Print["\<You have picked the path from (\>", u, "\<,\>", 
          t, "\<) to (\>", w, "\<,\>", v, "\<).\>"]]; \ 
      pathpoints = {{u, t}, {w, v}}; angyy = 0; angxx = 0; no = 0; inver = 0; 
      angyy = ArcTan[Abs[u - w]/Abs[t - v]]; angxx = Pi/2 - angyy; 
      If[angxx > angyy, no = 1; If[t > v, alter = t; t = v; v = alter]; 
        If[u > w, alter = u; u = w; w = alter], inver = 1; 
        If[t > v, alter = t; t = v; v = alter]; 
        If[u > w, alter = u; u = w; w = alter]]; \[IndentingNewLine]If[
        no == 1, x = u; x1 = u; y = t; d = {}; e = {}; midp = 0; soma = 0; 
        midpoint = {}; i = 0; jset = 0; 
        While[y <= v, 
          While[x < matx + 1, 
            While[b[\([x, y]\)] >= m, d = Append[d, {x, y}]; soma = soma + x; 
              x = x + 1; i = i + 1]; 
            If[i \[NotEqual] 0, jset = jset + 1; \ 
              midp = IntegerPart[soma/i]; midpoint = Append[midpoint, midp]; 
              midp = 0; i = 0; soma = 0, x = x + 1]]; x2 = 0; k = 1; 
          dist1 = 0; dist = matx*2; 
          While[k \[LessEqual] jset, dist1 = Abs[midpoint[\([k]\)] - x1]; \ 
            If[dist1 < dist, x2 = midpoint[\([k]\)]; dist = dist1]; 
            k = k + 1]; 
          If[x1 \[NotEqual] u\  || \ y \[NotEqual] t, \ \ \ While[
              x2 < x1 - 1\  && \ b[\([x2 + 1, y]\)] \[GreaterEqual] m, 
              x2 = x2 + 1]; \ 
            While[x2 > x1 + 1\  && \ b[\([x2 - 1, y]\)] \[GreaterEqual] m, 
              x2 = x2 - 1]; \ e = Append[e, {x2, y}]; x1 = x2, 
            e = Append[e, {x2, y}]; x1 = x2]; y = y + 1; x = 1; i = 0; 
          jset = 0; midpoint = {}], \[IndentingNewLine]y = t; y1 = t; x = u; 
        d = {}; e = {}; midp = 0; soma = 0; midpoint = {}; i = 0; jset = 0; 
        While[x \[LessEqual] w, 
          While[y < maty + 1, 
            While[b[\([x, y]\)] >= m, d = Append[d, {x, y}]; soma = soma + y; 
              y = y + 1; i = i + 1]; 
            If[i \[NotEqual] 0, jset = jset + 1; \ 
              midp = IntegerPart[soma/i]; midpoint = Append[midpoint, midp]; 
              midp = 0; i = 0; soma = 0, y = y + 1]]; y2 = 0; k = 1; 
          dist1 = 0; dist = maty*2; 
          While[k \[LessEqual] jset, dist1 = Abs[midpoint[\([k]\)] - y1]; \ 
            If[dist1 < dist, y2 = midpoint[\([k]\)]; dist = dist1]; 
            k = k + 1]; 
          If[y1 \[NotEqual] t\  || \ x \[NotEqual] u, \ \ \ While[
              y2 < y1 - 1\  && \ b[\([x, y2 + 1]\)] \[GreaterEqual] m, 
              y2 = y2 + 1]; \ 
            While[y2 > y1 + 1\  && \ b[\([x, y2 - 1]\)] \[GreaterEqual] m, 
              y2 = y2 - 1]; \ e = Append[e, {x, y2}]; y1 = y2, 
            e = Append[e, {x, y2}]; y1 = y2]; x = x + 1; y = 1; i = 0; 
          jset = 0; midpoint = {}]]; 
      e1 = ListPlot[d, PlotRange \[Rule] All, PlotStyle -> PointSize[0.013], 
          Frame -> True, Axes -> False, AspectRatio \[Rule] Automatic]; 
      e2 = 
        ListPlot[e, PlotRange \[Rule] All, 
          PlotStyle \[Rule] RGBColor[1, 0, 0], PlotStyle -> PointSize[0.013], 
          Frame -> True, Axes -> False, 
          AspectRatio \[Rule] Automatic]; \[IndentingNewLine]le = Length[e]; 
      Print\ ["\<Vector e has  \>", le, \ "\< points\>"]; e; 
      pp1 = ListPlot[pathpoints, PlotRange \[Rule] All, 
          PlotStyle \[Rule] RGBColor[1, 0, 0], PlotStyle -> PointSize[0.013], 
          Frame -> True, Axes -> False, AspectRatio \[Rule] Automatic]; 
      Show[e1, pp1]; Show[pp2]; Show[e1, e2]; anshere = 1; 
      anshere = 
        Input["\<Please confirm (1) that the path extremes are correct (red \
points), comparing with the original plot. If not, write 0.\>"]]; \ 
    Print\ ["\<Vector e has  \>", le, \ "\< points\>"]; e\)}], "Input"],

Cell[BoxData[
    \(\(\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\( (*\ 
      Routine\ 4\ *) \)\(\[IndentingNewLine]\)\( (*\ 
      ONLY\ if\ \(necessary : \ 
          comment\ out\)\ *) \)\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\
\)\)], "Input"],

Cell[BoxData[
    \( (*\ e = {}; 
      e2 = ListPlot[e, PlotRange \[Rule] All, PlotStyle -> PointSize[0.013], 
          Frame -> True, Axes -> False, AspectRatio \[Rule] Automatic]\ ; 
      le = Length[e]; Print\ ["\<Vector e has  \>", le, \ "\< points\>"]; \ 
      e\ *) \)], "Input"],

Cell[BoxData[
    \(\(\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\( (*\ 
      Routine\ 5\ \((seeing)\)\ *) \)\(\[IndentingNewLine]\)\(\
\[IndentingNewLine]\)\)\)], "Input"],

Cell[BoxData[
    \(\(\(\[IndentingNewLine]\)\( (*\ 
      Routine\ 5.1\ \((Circle\ Fitting)\)\ *) \)\(\[IndentingNewLine]\)\)\)], \
"Input"],

Cell[BoxData[
    \(circfit1 = 
      FindFit[e, 
        atr + Sqrt[
            3233^2 - \((UnitStep[r - nx1]*UnitStep[nx2 - r]*r - 
                    btr)\)^2], {atr, btr}, r, MaxIterations \[Rule] 50000, 
        Method -> LevenbergMarquardt]; atrstr = ToString[circfit1[\([1]\)]]; 
    btrstr = ToString[circfit1[\([2]\)]]; latrstr = StringLength[atrstr]; 
    lbtrstr = StringLength[btrstr]; 
    atr2 = ToExpression[StringTake[atrstr, {8, latrstr}]]; 
    btr2 = ToExpression[StringTake[btrstr, {8, lbtrstr}]]; 
    circfit2 = 
      FindFit[e, 
        atm - Sqrt[
            3233^2 - \((UnitStep[r - nx1]*UnitStep[nx2 - r]*r - 
                    btm)\)^2], {atm, btm}, r, MaxIterations \[Rule] 50000, 
        Method -> LevenbergMarquardt]; atmstr = ToString[circfit2[\([1]\)]]; 
    btmstr = ToString[circfit2[\([2]\)]]; latmstr = StringLength[atmstr]; 
    lbtmstr = StringLength[btmstr]; 
    atm2 = ToExpression[StringTake[atmstr, {8, latmstr}]]; 
    btm2 = ToExpression[StringTake[btmstr, {8, lbtmstr}]]; 
    e10 = Plot[atr2 + Sqrt[3233^2 - \((r - btr2)\)^2], {r, nx1, nx2}, 
        PlotStyle \[Rule] {RGBColor[0, 1, 0], AbsoluteThickness[2]}]; 
    e20 = Plot[atm2 - Sqrt[3233^2 - \((r - btm2)\)^2], {r, nx1, nx2}, 
        PlotStyle \[Rule] {RGBColor[0, 1, 0], AbsoluteThickness[2]}]; 
    Show[e10, e1]; Show[e10, e2]; Show[e20, e1]\ ; Show[e20, e2]\ ; 
    ans = Input["\<After careful eye inspection of both plots, including \
curvature analysis, which one is better? If the 1st one (or the two cannot be \
distinguished), please place '1' below (only the number). If the 2nd one, \
please place '2'.\>"]; 
    If[ans \[Equal] 2, at = atm2; bt = btm2; sinal = \(-1\), at = atr2; 
      bt = btr2; sinal = 1]; l = 1; n2 = Length[e]; distancirc = {}; 
    somasqr = 0; 
    While[l \[LessEqual] n2, 
      sdf = Minimize[
          Sqrt[\((ttt - e[\([l, 1]\)])\)^2 + \((at + 
                    sinal*Sqrt[Abs[3233^2 - \((ttt - bt)\)^2]] - 
                    e[\([l, 2]\)])\)^2], ttt]; 
      distancirc = Append[distancirc, sdf[\([1]\)]]; 
      somasqr = somasqr + sdf[\([1]\)]^2; l = l + 1]; 
    seeingPh = Median[distancirc]; seeingVis = 2*seeingPh; 
    seeingPh2 = Sqrt[somasqr/n2]; \ seeingVis2 = 2*seeingPh2; 
    sddev = seeingVis2*0.77/
          206265; \ \ Print["\<CCD Seeing (R.M.S.) - CIRCLE FIT in arcseconds \
=  \>", seeingPh2*0.77\ ];\)], "Input"],

Cell[BoxData[
    \(\(\(\[IndentingNewLine]\)\( (*\ 
      Routine\ 5.2\ \((Parabole\ Fitting)\)\ \
*) \)\(\[IndentingNewLine]\)\)\)], "Input"],

Cell[BoxData[{
    \(parabfit1 = FindFit[e, a3 + a2\ xp + a1\ xp^2, \ {a3, a2, a1}, xp]; 
    a3str = ToString[parabfit1[\([1]\)]]; 
    a2str = ToString[parabfit1[\([2]\)]]; 
    a1str = ToString[parabfit1[\([3]\)]]; la3str = StringLength[a3str]; 
    la2str = StringLength[a2str]; la1str = StringLength[a1str]; 
    aa3 = ToExpression[
        StringTake[a3str, {7, la3str}]];\), "\[IndentingNewLine]", 
    \(aa2 = ToExpression[StringTake[a2str, {7, la2str}]]; 
    aa1 = ToExpression[
        StringTake[a1str, {7, la1str}]];\), "\[IndentingNewLine]", 
    \(e3 = 
      Plot[aa3 + aa2\ xrt + aa1\ xrt^2, {xrt, nx1, nx2}, 
        PlotStyle \[Rule] {RGBColor[0, 1, 0], AbsoluteThickness[2]}]; 
    Show[e3, e1]; Show[e3, e2]; l = 1; n2 = Length[e]; distancia = {}; 
    somasqr = 0; 
    While[l \[LessEqual] n2, 
      sdf = Minimize[
          Sqrt[\((tpy - e[\([l, 1]\)])\)^2 + \((aa3 + aa2\ tpy + aa1\ tpy^2 - 
                    e[\([l, 2]\)])\)^2], tpy]; 
      distancia = Append[distancia, sdf[\([1]\)]]; 
      somasqr = somasqr + sdf[\([1]\)]^2; l = l + 1]; 
    seeingPh = Median[distancia]; seeingVis = 2*seeingPh; u1 = e[\([1, 1]\)]; 
    t1 = e[\([1, 2]\)]; w1 = e[\([n2, 1]\)]; v1 = e[\([n2, 2]\)]; 
    angyy = Abs[ArcTan[Abs[u1 - w1]/Abs[t1 - v1]]]; 
    If[angyy >  .78539816344, angyy = Pi/2 - angyy]; 
    fatorredutor = Sqrt[1 + \((Tan[angyy])\)^2]; 
    While[l < n2, u1 = e[\([l, 1]\)]; t1 = e[\([l, 2]\)]; 
      w1 = e[\([l + 1, 1]\)]; v1 = e[\([l + 1, 2]\)]; 
      If[t1 - v1 \[NotEqual] 0, 
        angyy = Abs[ArcTan[Abs[u1 - w1]/Abs[t1 - v1]]]; 
        If[angyy >  .78539816344, angyy = Pi/2 - angyy]; 
        fatorredutor = Sqrt[1 + \((Tan[angyy])\)^2], fatorredutor = 1]; 
      l = l + 1]; seeingPh2 = Sqrt[somasqr/n2]; \ seeingVis2 = 2*seeingPh2; 
    sddev = seeingVis2*0.77/206265; \ 
    Print["\<CCD Seeing (R.M.S.) - PARABOLE FIT in arcseconds =  \>", 
      seeingPh2*0.77\ ];\)}], "Input"],

Cell[BoxData[
    \(\(\(\[IndentingNewLine]\)\( (*\ 
      Routine\ 5.3\ \(("\<Horizontal\>"\ Fitting)\)\ *) \)\(\
\[IndentingNewLine]\)\)\)], "Input"],

Cell[BoxData[
    \(l = 1; n2 = Length[e]; distancirc = {}; xarcocirculo = {}; valor = 0; 
    sdf = 0; somasqr = 0; 
    ArcoCirculo = at + sinal*Sqrt[3233^2 - \((ty - bt)\)^2]; 
    While[l \[LessEqual] n2, 
      xarcocirculo = Solve[ArcoCirculo \[Equal] e[\([l, 2]\)], ty]; 
      valor = ty\  /. \ xarcocirculo[\([1]\)]; 
      sdf = Abs[valor - e[\([l, 1]\)]]; distancirc = Append[distancirc, sdf]; 
      somasqr = somasqr + sdf^2; l = l + 1; xarcocirculo = {}; sdf = 0; 
      valor = 0]; seeingPh = Median[distancirc]; seeingVis = 2*seeingPh; 
    seeingPh2 = Sqrt[somasqr/n2]; \ seeingVis2 = 2*seeingPh2; 
    sddev = seeingVis2*0.77/
          206265; \ \ Print["\<CCD Seeing (R.M.S.) - HORIZONTAL FIT in \
arcseconds =  \>", seeingPh2*0.77\ ];\)], "Input"]
},
FrontEndVersion->"5.0 for Microsoft Windows",
ScreenRectangle->{{0, 1920}, {0, 982}},
WindowSize->{875, 880},
WindowMargins->{{-8, Automatic}, {Automatic, 16}}
]

(*******************************************************************
Cached data follows.  If you edit this Notebook file directly, not
using Mathematica, you must remove the line containing CacheID at
the top of  the file.  The cache data will then be recreated when
you save this file from within Mathematica.
*******************************************************************)

(*CellTagsOutline
CellTagsIndex->{}
*)

(*CellTagsIndex
CellTagsIndex->{}
*)

(*NotebookFileOutline
Notebook[{
Cell[1754, 51, 162, 3, 110, "Input"],
Cell[1919, 56, 902, 21, 150, "Input"],
Cell[2824, 79, 162, 3, 110, "Input"],
Cell[2989, 84, 197, 4, 50, "Input"],
Cell[3189, 90, 162, 3, 110, "Input"],
Cell[3354, 95, 9703, 172, 1750, "Input"],
Cell[13060, 269, 257, 5, 130, "Input"],
Cell[13320, 276, 289, 5, 50, "Input"],
Cell[13612, 283, 176, 3, 110, "Input"],
Cell[13791, 288, 141, 3, 70, "Input"],
Cell[13935, 293, 2395, 44, 470, "Input"],
Cell[16333, 339, 143, 3, 70, "Input"],
Cell[16479, 344, 1937, 36, 330, "Input"],
Cell[18419, 382, 151, 3, 70, "Input"],
Cell[18573, 387, 768, 13, 150, "Input"]
}
]
*)



(*******************************************************************
End of Mathematica Notebook file.
*******************************************************************)

