====== Steps to do before the actual data processing ====== Ideally, the steps listed below should be done only once for every beamtime (as long as the detector is not moved or the wavelength is not changed). The information obtained by following these steps can then be used for any data set acquired at that beamtime. ===== Figure out your O-Matrix ===== To do so, click [[dac_experiments:geometry|here]]. ===== Calibrate your standard material ===== The aim of the calibration of the standard material is to obtain * the exact sample-detector distance (Fit2D or Dioptas) * the exact beam center (Fit2D or Dioptas) * the instrument parameters (MAUD and ImageD11) Sample-detector distance and beam center can be obtained either from [[software:fit2d|Fit2D]] or [[software:dioptas|Dioptas]]. Both options should give the same (or very, very similar) results. The instrument parameters are calculated in a different way, depending on the software ([[software:maud|MAUD]] or [[software:imaged11|ImageD11]]). Furthermore, each software uses parameters which the other software doesn't use. So even if the calibration in MAUD and ImageD11 seems to be the same, one has to do both calibrations independently from each other. To make life easier, one should start with the sample-detector distance and the beam center (Fit2D/Dioptas). You can then enter those parameters in MAUD and ImageD11 and have already a very good guess. This saves time in the process of refinement. ==== Calibration in Fit2D ==== ... ==== Calibration in Dioptas ==== Open [[software:dioptas|Dioptas]], go to the tab //Calibration// (left side, vertical text) and open the image of your calibration material (click on ''Load file'' in the top right corner). In ''Calibration parameters'', enter your ''Start values'' (for your sample-detector distance, use a good guess). Make sure to also change the ''Calibrant'' drop-down menu to the material you were using. Leave the other values as they are. Now click the ''Calibrate'' button in the bottom left of the screen. Check if the white lines get straight and if the appearing red circles match the white lines of your data. Check also if the ''Fit2D parameters'' on the right show realistic values. If something seems odd check if you forgot something or if you loaded the wrong image. If everything seems to be correct you can click the ''Refine'' button in the bottom left repetitively until you are satisfied with the result. Then save the result by clicking ''Save calibration'' in the bottom right. It's also useful to make a screenshot of the Fit2D parameters for easier access later. ==== Calibration in MAUD ==== Start [[software:maud|MAUD]] and open the calibration material with the MAUD plugin (click [[software:maud|here]] for a description). Then you can do a normal Rietveld refinement in MAUD to obtain the exact instrument parameters. When you are done save the whole analysis as a file. There is also a way to save the instrument parameters separately but this sometimes doesn't work. The safest way to load the instrument parameters in the future is to load the whole analysis and change the phase and the sample. In a future analysis you don't refine the instrument parameters anymore. ==== Calibration in ImageD11 ==== To do this, you should first have a look at your calibration image with Fabian. Move the cursor across the image while checking the intensities of the rings and the background (values at the bottom right of the Fabian window). Estimate a threshold value which clearly separates the background from the ring intensities. Next, you can perform a [[processing:search_for_peaks|Peaksearch]]. In [[software:fabian|Fabian]], you can visualize the peaks by clicking ''CrysTools'' -> ''Peaks'' -> ''Read peaks''. At this point you usually realize that the threshold assumed previously was only semi-correct. But don't worry, you might still be able to use these peaks. The intensities of the standard material can vary a lot depending on 2theta angle. Just perform another Peaksearch with a different threshold that covers the peaks you didn't get before. When you have two or three files that contain the 10-15 innermost rings, you are fine. Now, you can either choose the most promising file or merge them with the script ''merge_flt.py'' (can be found in ImageD11 on GitHub). Then, you can load the peak file into [[software:imaged11|ImageD11]] (click ''Transformation'' -> ''Load filtered peaks''). Click ''Transformation'' -> ''Edit parameters'' and enter all values which you know for certain. These are usually the cell parameters (make sure to use the same standard as in Fit2D/Dioptas and MAUD!), O-Matrix, omegasign, wavelength and pixel size. For the sample-detector distance and the beam center enter the values you obtained from Fit2D/Dioptas*. Leave the other values as they are. Now activate the check boxes for //distance, t_x, t_y, t_z, tilt_x, tilt_y, tilt_z, y_center// and //z_center// (deactivate all others) and click ''Ok''. *The beam center in Dioptas and ImageD11 is calculated differently. The conversion goes like this:\\ ''ImageD11'' y_center = ''Dioptas'' Center X\\ ''ImageD11'' z_center = ''Dioptas'' 2048 - Center Y Now click ''Transformations'' -> ''Fit'' repetitively until the lines are very straight, even when you zoom in. For a last check-up you can click ''Transformation'' -> ''Add unit cell peaks''. The red tick marks should match the green lines of peaks perfectly. When you're done, save the parameters (''Transformation'' -> ''Save parameters'') with the ending //.prm//. Whenever you feel like doing something in ImageD11 in the future, always load the parameter file first (''Transformation'' -> ''Load parameters'') and change nothing but the cell parameters (''Transformation'' -> ''Edit parameters'')! ===== Convert your data set to the correct file format ===== To process the data you need it in [[fileformat:edf|EDF format]]. Usually, the beamlines provide their data in MarCCD or TIFF so you have to convert it before further use. [[xray_data:convertfileseries|Click here to read how to convert your data set.]]