Skip to content

Commit

Permalink
Doc, example and @ref fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ddahlbom committed Jul 26, 2023
1 parent b91469c commit 3a0721f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/src/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ can be resolved by passing an explicit `offset`.
The function [`remove_periodicity!`](@ref) disables periodicity along specified
dimensions.

Rename `StaticStructureFactor` to [`InstantStructureFactor`](@ref).
Rename `StaticStructureFactor` to [`InstantStructureFactor`].


# Version 0.4.2
Expand Down
12 changes: 6 additions & 6 deletions docs/src/writevtk.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ParaView supports volumetric rendering:
First, generate some correlation data in Sunny.
We will use a 2D lattice, since the correlation data ``S(Q_x,Q_y,\omega)`` is
3D and can be exported in its entirety.
The following code sets up the system, thermalizes it, and records the correlation data in a [`SampledCorrelations`](@ref) called `dsf`.
The following code sets up the system, thermalizes it, and records the correlation data in a `SampledCorrelations` called `dsf`.

```julia
using Sunny
Expand Down Expand Up @@ -44,11 +44,11 @@ end

ωmax=10.

dsf = SampledCorrelations(sys
;Δt=Δt
,nω=48
,ωmax=ωmax
,process_trajectory=:symmetrize)
dsf = dynamical_correlations(sys
;Δt=Δt
,nω=48
,ωmax=ωmax
,process_trajectory=:symmetrize)

nsamples = 10
for _ in 1:nsamples
Expand Down
4 changes: 2 additions & 2 deletions examples/powder_averaging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ for _ ∈ 1:3000
step!(sys, integrator)
end;

# We can now estimate ``𝒮(𝐪,ω)`` with [`SampledCorrelations`](@ref). We
# We can now estimate ``𝒮(𝐪,ω)`` with [`dynamical_correlations`](@ref). We
# will tell Sunny to symmetrize the sample trajectory along the time-axis to
# minimize Fourier artifacts.

Expand Down Expand Up @@ -125,7 +125,7 @@ fig1
# [`add_sample!`](@ref)
# - Increasing the system size to improve momentum space resolution
# - Increasing the energy resolution (`nω` keyword of
# [`SampledCorrelations`](@ref))
# [`dynamical_correlations`](@ref))
# - Applying instrument-specific energy broadening by giving `broaden_energy` a
# custom kernel function.
# - Including [`FormFactor`](@ref) corrections
Expand Down
2 changes: 1 addition & 1 deletion src/Reshaping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ output from this function will typically be used as input to
Because this function does not incorporate phase information in its averaging
over sublattices, the printed weights are not directly comparable with
experiment. For that purpose, use [`InstantCorrelations`](@ref) instead.
experiment. For that purpose, use [`instant_correlations`](@ref) instead.
The weights printed by `print_wrapped_intensities` may be given a physical
interpretation as follows: All possible ``q``-vectors are periodically wrapped
Expand Down
13 changes: 10 additions & 3 deletions src/SampledCorrelations/SampledCorrelations.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""
SampledCorrelations
Basic data type for storing sampled correlation data. A `SampleCorrelations` is
initialized by calling either [`dynamical_correlations`](@ref) or
[`instant_correlations`](@ref).
"""
struct SampledCorrelations{N}
# 𝒮^{αβ}(q,ω) data and metadata
data :: Array{ComplexF64, 7} # Raw SF data for 1st BZ (numcorrelations × natoms × natoms × latsize × energy)
Expand Down Expand Up @@ -290,14 +297,14 @@ information. ``𝒮(𝐪)`` data can be retrieved by calling
[`instant_intensities_interpolated`](@ref).
_Important note_: When dealing with continuous (non-Ising) spins, consider
creating a full [`SampledCorrelations`](@ref) object instead of an
`InstantCorrelations`. The former will provide full ``𝒮(𝐪,ω)`` data, from
creating using [`dynamical_correlations`](@ref) instead of
`instant_correlations`. The former will provide full ``𝒮(𝐪,ω)`` data, from
which ``𝒮(𝐪)`` can be obtained by integrating out ``ω``. During this
integration step, Sunny can incorporate temperature- and ``ω``-dependent
classical-to-quantum correction factors to produce more accurate ``𝒮(𝐪)``
estimates. See [`instant_intensities_interpolated`](@ref) for more information.
Prior to calling `InstantCorrelations`, ensure that `sys` represents a good
Prior to calling `instant_correlations`, ensure that `sys` represents a good
equilibrium sample. Additional sample data may be accumulated by calling
[`add_sample!`](@ref)`(sc, sys)` with newly equilibrated `sys` configurations.
Expand Down
2 changes: 1 addition & 1 deletion src/Sunny.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ include("SampledCorrelations/FormFactor.jl")
include("SampledCorrelations/BasisReduction.jl")
include("Intensities/Types.jl")
include("SampledCorrelations/DataRetrieval.jl")
export dynamical_correlations, instant_correlations, FormFactor,
export SampledCorrelations, dynamical_correlations, instant_correlations, FormFactor,
add_sample!, broaden_energy, lorentzian,
all_exact_wave_vectors, ωs, spherical_shell, merge!, intensity_formula, integrated_lorentzian

Expand Down
3 changes: 2 additions & 1 deletion src/VTKExport.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function export_vtk(filename,sys; coordinates = :physical, log_scale = false)

## Save S(Q) correlations

ic = InstantCorrelations(sys)
ic = instant_correlations(sys)
add_sample!(ic, sys)
params = unit_resolution_binning_parameters(ic)
formula = intensity_formula(ic,:trace)

Expand Down

0 comments on commit 3a0721f

Please sign in to comment.