The crystal on the pin (or the loop) of the goniometer head, the diffraction experiment is the gradual movement around multiple axes (or circles) to access a reasonably large portion of the reciprocal space around the crystal. One of the more frequent setups is a 4-circle diffractometer
(credit UPenn)
With the crystal symbolized by the cube in the center you have circles $\phi$, $\omega$, $2\theta$ and $\chi$. It is highly important to keep track of these angles varied during the experiment -- just as well as the distance between the center of these circles and the detector (which is adjustable, but typically remains fix during a collection of data) while recording reflection intensity in $(x,y)$ coordinates of the detector's sensor.
For each position* an individual file (frame) is saved. For efficiency of file I/O and storage, most of it is in a binary format to be read by the specialized software you purchase with the diffractometer. However the header line needn't be. For an easier read, I wrapped it and added leading line numbers to get this (partly redacted) frame recorded on an old Bruker SMART 1K 3-circle diffractometer:
1 FORMAT : 86
2 VERSION: 9
3 HDRBLKS: 15
4 TYPE :Scan frame
5 SITE :UNIVERSITY OF
6 MODEL :PLATFORM
7 USER :UNIVERSITY OF
8 SAMPLE :sucrose
9 SETNAME:sucrose
10 RUN : 2
11 SAMPNUM: 1
12 TITLE :sucrose from
13 TITLE :
14 TITLE :
15 TITLE :
16 TITLE :
17 TITLE :
18 TITLE :
19 TITLE :
20 NCOUNTS: 7267500 0
21 NOVERFL: 19
22 MINIMUM: 0
23 MAXIMUM: 1912
24 NONTIME: 221796409
25 NLATE : 0
26 FILENAM:
27 CREATED:DD/MM/YY HH:MM:SS
28 CUMULAT: 64.5835953
29 ELAPSDR: 30.0000000
30 ELAPSDA: 32.2956886
31 OSCILLA: 0
32 NSTEPS : 1
33 RANGE : 0.3000000
34 START : -91.9000015
35 INCREME: -0.3000183
36 NUMBER : 224
37 NFRAMES: 606
38 ANGLES : 332.0000000 268.1000061 90.0000000 54.7200012
39 NOVER64: 0
40 NPIXELB: 1
41 NROWS : 512
42 NCOLS : 512
43 WORDORD: 0
44 LONGORD: 0
45 TARGET :Mo
46 SOURCEK: 45.0000000
47 SOURCEM: 40.0000000
48 FILTER :Parallel,graphite
49 CELL : 15.7668018 15.8232164 6.9688878 90.1392212 90.0406418
50 CELL : 119.5063553
51 MATRIX : -0.0514976 0.0165236 -0.0360825 0.0513622 0.0687769
52 MATRIX : -0.0235442 0.457335E-02 -0.0164295 -0.1368749
53 LOWTEMP: 0 0 -5290
54 ZOOM : 0.5000000 0.5000000 1.0000000
55 CENTER : 253.6660004 261.7380066
56 DISTANC: 5.4480000
57 TRAILER: -1
58 COMPRES:NONE
59 LINEAR : 1.0000000 0.0000000
60 PHD : 0.0000000 0.0000000
61 PREAMP : 4.0000000
62 CORRECT:K426L170
63 WARPFIL:K426L170._ix
64 WAVELEN: 0.7107300 0.0000000 0.0000000
65 MAXXY : 331.0000000 392.0000000
66 AXIS : 2
67 ENDING : 332.0000000 267.7999878 90.0000000 54.7200012
68 DETPAR : 0.0292703 0.0700109 0.896212E-02 -0.3303430 0.2778771
69 DETPAR : 0.1510672
70 LUT :BB
71 DISPLIM: 0.0000000 0.0000000
72 PROGRAM:SMART V5.059
73 ROTATE : 0
74 BITMASK:$NULL
75 OCTMASK: 15 30 15 481 497 993
76 OCTMASK: 497 481
77 ESDCELL: 0.0443505 0.0362424 0.0149620 0.2186361 0.2676024
78 ESDCELL: 0.1994543
79 DETTYPE:CCD-PXL
80 NEXP : 2 410 32 2 0
81 CCDPARM: 13.6999998 2.2000000 28.0000000 410.0000000 65535.0000000
82 CHEM :C6 H12 O6
83 MORPH :plate like
84 CCOLOR :yellow
85 CSIZE :0.50 mm|0.20 mm|0.13 mm|not determined|room temperature
86 DNSMET :x
87 DARK :dark060s._dk
88 AUTORNG: 4.0000000 13.6999998 2.2000000 0.0000000 65535.0000000
89 ZEROADJ: 0.0000000 0.0000000 0.0000000 0.0000000
90 XTRANS : 0.0000000 0.0000000 0.0000000
91 HKL&XY : 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
92 AXES2 : 0.0000000 0.0000000 0.0000000 0.0000000
93 ENDING2: 0.0000000 0.0000000 0.0000000 0.0000000
characteristics of the sample (e.g., 8-19, 82-85)
lattice constants and orientation matrix as assigned at this stage of the experiment (49-52)
distance center of the circles to detector (56, in centimeters, evidently to characterize a crystal of a small molecule compound), and current angle of the frame (38); the trailing entry about 54 degrees is characteristic for the fixed $\chi$ of this setup).
details about the radiation (45, 48, 64)
correction data and files about dead pixels and dark image (e.g., 63 or 87) for background correction
book keeping where the current frame (36) is within the current run (10) and the experiment as a whole set of frames recorded in total (37). If you look closely, one typical experiment initiates with is a quick (adjusting) large move of $\phi$, $\omega$, $2\theta$, $\chi$ (if available). This is followed by small slow moves of the camera ($2\theta$ angle), each of them to record a single frame. When meeting a geometrical constraint, these small moves stop (and close the run); the diffractometer moves to new «starting position» with the same initial $2\theta$ angle but very different $\phi$ angle to begin a new run.
To illustrate this a little bit, I «greped» a couple of measurements of one analysis to yield a table about the file name of the individual frame recorded, the run and frame number, and the angles $\omega, 2\theta, \phi, \chi$.
YLID1.001 RUN: 1 NUMBER: 1 ANGLES: 332.0000000 335.0000000 0.0000000 54.7200012
YLID1.002 RUN: 1 NUMBER: 2 ANGLES: 332.0000000 334.7000122 0.0000000 54.7200012
YLID1.003 RUN: 1 NUMBER: 3 ANGLES: 332.0000000 334.3999939 0.0000000 54.7200012
YLID1.004 RUN: 1 NUMBER: 4 ANGLES: 332.0000000 334.1000061 0.0000000 54.7200012
YLID1.005 RUN: 1 NUMBER: 5 ANGLES: 332.0000000 333.7999878 0.0000000 54.7200012
YLID1.006 RUN: 1 NUMBER: 6 ANGLES: 332.0000000 333.5000000 0.0000000 54.7200012
YLID1.007 RUN: 1 NUMBER: 7 ANGLES: 332.0000000 333.2000122 0.0000000 54.7200012
YLID1.008 RUN: 1 NUMBER: 8 ANGLES: 332.0000000 332.8999939 0.0000000 54.7200012
YLID1.009 RUN: 1 NUMBER: 9 ANGLES: 332.0000000 332.6000061 0.0000000 54.7200012
YLID1.010 RUN: 1 NUMBER: 10 ANGLES: 332.0000000 332.2999878 0.0000000 54.7200012
[...]
YLID2.001 RUN: 2 NUMBER: 1 ANGLES: 332.0000000 335.0000000 90.0000000 54.7200012
YLID2.002 RUN: 2 NUMBER: 2 ANGLES: 332.0000000 334.7000122 90.0000000 54.7200012
YLID2.003 RUN: 2 NUMBER: 3 ANGLES: 332.0000000 334.3999939 90.0000000 54.7200012
YLID2.004 RUN: 2 NUMBER: 4 ANGLES: 332.0000000 334.1000061 90.0000000 54.7200012
YLID2.005 RUN: 2 NUMBER: 5 ANGLES: 332.0000000 333.7999878 90.0000000 54.7200012
[...]
YLID3.001 RUN: 3 NUMBER: 1 ANGLES: 332.0000000 335.0000000 180.0000000 54.7200012
YLID3.002 RUN: 3 NUMBER: 2 ANGLES: 332.0000000 334.7000122 180.0000000 54.7200012
YLID3.003 RUN: 3 NUMBER: 3 ANGLES: 332.0000000 334.3999939 180.0000000 54.7200012
YLID3.004 RUN: 3 NUMBER: 4 ANGLES: 332.0000000 334.1000061 180.0000000 54.7200012
YLID3.005 RUN: 3 NUMBER: 5 ANGLES: 332.0000000 333.7999878 180.0000000 54.7200012
[...]
How many individual frames per run, how many runs in total, their start and end parameter are needed to collect data good enough in quality and quantity depends on the sample, the (presumed) symmetry of the sample and its orientation in the coordinates of the diffractometer, if accurately recording many Friedel pairs for an absolute structure determination is requested. There are programs are around to assist the operator in the decision to define the experiment accordingly.
Depending on the sample's quality, internal symmetry and the crystals's relative orientation vs. the coordinate system of the diffractometer, modern diffractometers equipped with an area detector can suggest an (initial) set of lattice vectors and an orientation matrix after recording only a few dozen diffraction frames with a couple of well resolved diffraction peaks.** With contemporary diffractometers equipped with area detectors, it usually is not problematic to collect a couple of new/additional diffraction frames which then are processed altogether with the previous data to assign a new set of lattice vectors and orientation matrix.*** If this fails (e.g., suggesting a unit cell obviously too small to accommodate the molecules in question, of wrong handiness) one can provide a transformation matrix to get this one right, and which often simultaneously affects the orientation matrix.
Addition: In a comment, you ask why we need an orientation matrix at all, given Bragg's law of $n\lambda = 2d \sin\theta$. Its purpose is to translate from coordinate system of the reciprocal space $(a^*,b^*,c^*)$ into the cartesien $(x,y,z)$ of the diffractometer. The former may be oblique because $(a,b,c)$ in the rhombohedral, hexagonal, monoclinic, triclinic crystal system enclose at least one angle which is not constrained to $90^\circ$, while all planes of the later are orthogonal to each other. (The software equally takes care for the translation of diffraction intensities on the Ewald sphere projected onto the shape of the detector area; a bit related to mapping 3D earth on a 2D sheet of paper.)
For context, in good cases,
- a couple dozen of frames suffice for an initial set of lattice vectors and orientation matrix
- you continue to collect many more frames according to the presumed symmetry and hence completeness of the data; perhaps refine the orientation matrix now while indexing faces and recording a manual absorption correction with the crystal still mounted on the goniometer head
- you perform data reduction. In this step, one often obtains an even better orientation matrix and lattice constants which then are used to extract the diffraction intensities. Alternatively to the above, it may be now the time for an absorption correction. Instead of hkl expressed in direction cosines tied on a particular setup, you obtain the device independent handy hkl file.
- start with structure solution (determine at least all non-H atoms)
- complete with structure refinement
* Actually it is a small and slow sweep of increments like $0.3^\circ{}$ along $2\theta$ while the other circles are kept fix while recording a frame.
** Diffractometers with the elder detection technique of a spot detector/counter tube like the famous Enraf Nonius CAD 4 in $\kappa$ geometry (example, the counting tube with pencil narrow opening just across the X-ray tube/collimator) have their own very elaborate algorithm to orbit around the crystal to determine an initial cell and orientation matrix to identify about 25 good diffraction peaks (ref) for the initial guess. Before recording the big data set eventually used for integration, absorption correction, crystal structure solution and refinement.
*** The possibility to rerun from scratch the data reduction of diffraction data collected with area detectors is a huge advantage compared to those collected with point detectors. Aside from shorter acquisition times.