# Job: Local CTF Refinement

## **Description**

`Local CTF Refinement` performs per-particle defocus estimation for each particle in a dataset, against a given 3D reference structure. Read a tutorial [here](/processing-data/tutorials-and-case-studies/tutorial-ctf-refinement.md).

## **Input**

* Particles
  * `ctf` (required)
  * `alignments3D` (required)
  * `blob` (required)
* Volume
  * `map` (optional)
  * `map_half_A` (required)
  * `map_half_B` (required)
  * `mask_refine` (optional)
* Mask
  * `mask` (optional)

## **Output**

* Particle set with updated CTF parameters

## **Common Parameters**

* `Minimum fit res (A)`: controls the minimum resolution used for fitting. Generally CTF refinement should be done only with medium to high resolution signal, as low resolution signal can throw off CTF fits. For smaller particles, change this to a higher resolution.
* `Maximum fit res (A)`: controls the maximum resolution used for fitting. Higher resolution signal is better for CTF refinement, until there is too much noise present in the half-maps. Leave this blank to have the maximum resolution automatically determined via FSC between the two input half-maps.
* `Defocus search range`: controls how far above and below the current defocus to search for the optimal defocus of each particle. If you used `Patch CTF Estimation` previously in cryoSPARC, this value can be made relatively small, about the same as the thickness of ice you expect to have in the sample, since the input defocus values will already be fairly accurate.
* `Optimize defocus over per-particle scale`: **New in CryoSPARC v5**. When this parameter is on (default), per-particle scale and defocus are optimized at the same time. In general this improves the defocus error landscape and may produce better defocus estimates.

<figure><img src="/files/p5T8Ya2fzNrmrBZfc0Bv" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.cryosparc.com/processing-data/all-job-types-in-cryosparc/ctf-refinement/job-local-ctf-refinement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
