From 9f4d50c008d3ac90aa0956efdfd8a3b99395b0a1 Mon Sep 17 00:00:00 2001 From: fjebaker Date: Thu, 23 Jan 2025 12:01:22 +0000 Subject: [PATCH] style: julia formatter and cleanup whitespaces --- src/datasets/datasets.jl | 10 +++++----- src/datasets/response.jl | 2 +- src/fitting/problem.jl | 2 +- src/fitting/result.jl | 2 +- src/utils.jl | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/datasets/datasets.jl b/src/datasets/datasets.jl index aff6935..6cac7c5 100644 --- a/src/datasets/datasets.jl +++ b/src/datasets/datasets.jl @@ -1,8 +1,8 @@ """ abstract type AbstractDataset - -Abstract type for use in fitting routines. High level representation of some underlying -data structures. + +Abstract type for use in fitting routines. High level representation of some underlying +data structures. Fitting data is considered to have an *objective* and a *domain*. As the domain may be, for example, energy bins (high and low), or @@ -87,7 +87,7 @@ make_model_domain(layout::AbstractLayout, dataset::AbstractDataset) = error("Layout $(layout) is not implemented for $(typeof(dataset))") """ - make_domain_variance(layout::AbstractLayout, dataset::AbstractDataset) + make_domain_variance(layout::AbstractLayout, dataset::AbstractDataset) Make the variance vector associated with the domain. """ @@ -99,7 +99,7 @@ make_domain_variance(layout::AbstractLayout, dataset::AbstractDataset) = Returns the array used as the output domain. That is, in cases where the model input and output map to different domains, the input domain is said to be the -model domain, the input domain is said to be the model domain. +model domain, the input domain is said to be the model domain. The distinction is mainly used for the purposes of simulating data and for visualising data. diff --git a/src/datasets/response.jl b/src/datasets/response.jl index 6a44f53..1423ae5 100644 --- a/src/datasets/response.jl +++ b/src/datasets/response.jl @@ -1,4 +1,4 @@ -# TODO: could be Response or Redistribution : how do we track this? +# TODO: could be Response or Redistribution : how do we track this? mutable struct ResponseMatrix{T} matrix::SparseMatrixCSC{T,Int} channels::Vector{Int} diff --git a/src/fitting/problem.jl b/src/fitting/problem.jl index 934deb5..c7545cd 100644 --- a/src/fitting/problem.jl +++ b/src/fitting/problem.jl @@ -88,7 +88,7 @@ end `items` is a tuple or vector of lengths `n1, n2, ...` -Returns a tuple or array with same length as items, which gives the index boundaries of +Returns a tuple or array with same length as items, which gives the index boundaries of an array with size `n1 + n2 + ...`. """ function _accumulated_indices(items) diff --git a/src/fitting/result.jl b/src/fitting/result.jl index 6e3d93c..aa03f66 100644 --- a/src/fitting/result.jl +++ b/src/fitting/result.jl @@ -13,7 +13,7 @@ function _pretty_print_result(model, u, σ, chi2) Model: $(model) . u : [$(ppu)] . σᵤ : [$(ppσ)] - . χ² : $(ppx2) + . χ² : $(ppx2) """ end diff --git a/src/utils.jl b/src/utils.jl index 757a267..cd8f9de 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -102,4 +102,4 @@ function count_error(k, σ) p = Distributions.cdf(Distributions.Normal(), σ) kₑ = gamma_inc_inv(k + 1, p, 1 - p) abs(k - kₑ) -end \ No newline at end of file +end