Skip to content

Commit be4c590

Browse files
authored
style: Rename Spectra.jl --> SpectrumBase.jl (#56)
Follow up to #41 (comment)
1 parent 595d3b0 commit be4c590

19 files changed

Lines changed: 56 additions & 69 deletions

CITATION.cff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
cff-version: 1.2.0
22
type: software
3-
title: Spectra.jl
3+
title: SpectrumBase.jl
44
message: If you use this software, please cite it using the metadata from this file.
5-
repository-code: 'https://github.com/JuliaAstro/Spectra.jl'
5+
repository-code: 'https://github.com/JuliaAstro/SpectrumBase.jl'
66
authors:
77
- given-names: Miles
88
family-names: Lucas
@@ -11,5 +11,5 @@ authors:
1111
- name: JuliaAstro
1212
email: astro@julialang.org
1313
website: 'https://juliaastro.org'
14-
url: 'https://juliaastro.org/Spectra'
14+
url: 'https://juliaastro.org/SpectrumBase'
1515
license: MIT

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name = "Spectra"
1+
name = "SpectrumBase"
22
uuid = "391af1a9-06f1-59d3-8d21-0be089654739"
33
version = "0.1.0"
44
authors = ["Miles Lucas <mdlucas@hawaii.edu>"]

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Spectra.jl
1+
# SpectrumBase.jl
22

3-
[![](https://img.shields.io/badge/docs-stable-blue.svg?label=docs)](https://juliaastro.org/Spectra.jl/stable)
4-
[![](https://img.shields.io/badge/docs-dev-blue.svg?label=docs)](https://juliaastro.org/Spectra.jl/dev)
3+
[![](https://img.shields.io/badge/docs-stable-blue.svg?label=docs)](https://juliaastro.org/SpectrumBase.jl/stable)
4+
[![](https://img.shields.io/badge/docs-dev-blue.svg?label=docs)](https://juliaastro.org/SpectrumBase.jl/dev)
55

6-
[![CI](https://github.com/JuliaAstro/Spectra.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/JuliaAstro/Spectra.jl/actions/workflows/CI.yml)
7-
[![codecov](https://codecov.io/gh/juliaastro/Spectra.jl/graph/badge.svg?token=EjMJcszaoQ)](https://codecov.io/gh/juliaastro/Spectra.jl)
8-
![GitHub](https://img.shields.io/github/license/juliaastro/Spectra.jl.svg)
6+
[![CI](https://github.com/JuliaAstro/SpectrumBase.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/JuliaAstro/SpectrumBase.jl/actions/workflows/CI.yml)
7+
[![codecov](https://codecov.io/gh/juliaastro/SpectrumBase.jl/graph/badge.svg?token=EjMJcszaoQ)](https://codecov.io/gh/juliaastro/SpectrumBase.jl)
8+
![GitHub](https://img.shields.io/github/license/juliaastro/SpectrumBase.jl.svg)
99

1010
Utilities for interfacing with astronomical spectra and synthetic spectra libraries.
1111

@@ -17,7 +17,7 @@ Utilities for interfacing with astronomical spectra and synthetic spectra librar
1717

1818
Currently this package can only be installed from github. To do so, either clone this repository and install it or
1919

20-
pkg> add https://github.com/JuliaAstro/Spectra.jl
20+
pkg> add https://github.com/JuliaAstro/SpectrumBase.jl
2121

2222
from the `pkg` command line (Press `]` from Julia REPL)
2323

@@ -33,10 +33,10 @@ julia --proj
3333
julia> import Pkg
3434
3535
# List tests
36-
julia> Pkg.test("Spectra"; test_args = `--list`)
36+
julia> Pkg.test("SpectrumBase"; test_args = `--list`)
3737
3838
# Run specific testsets by name. Will match with `startswith`
39-
julia> Pkg.test("Spectra"; test_args = `--verbose <testset name>`)
39+
julia> Pkg.test("SpectrumBase"; test_args = `--verbose <testset name>`)
4040
```
4141

4242
### Docs

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
66
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
77
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
88
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
9-
Spectra = "391af1a9-06f1-59d3-8d21-0be089654739"
9+
SpectrumBase = "391af1a9-06f1-59d3-8d21-0be089654739"
1010
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
1111
UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f"
1212

docs/make.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
using Documenter
2-
using Spectra
2+
using SpectrumBase
33
using Unitful
44
using Measurements
55
using Revise
66

77
Revise.revise()
88

9-
DocMeta.setdocmeta!(Spectra, :DocTestSetup, :(using Spectra); recursive = true)
9+
DocMeta.setdocmeta!(SpectrumBase, :DocTestSetup, :(using SpectrumBase); recursive = true)
1010

11-
makedocs(sitename = "Spectra.jl",
11+
makedocs(sitename = "SpectrumBase.jl",
1212
format = Documenter.HTML(;
1313
prettyurls = true,
14-
canonical = "https://juliaastro.org/Spectra/stable/",
14+
canonical = "https://juliaastro.org/SpectrumBase/stable/",
1515
),
1616
authors = "Miles Lucas and contributors.",
1717
linkcheck = !("skiplinks" in ARGS),
18-
modules = [Spectra],
18+
modules = [SpectrumBase],
1919
pages = [
2020
"Home" => "index.md",
2121
"spectrum.md",
@@ -29,8 +29,8 @@ makedocs(sitename = "Spectra.jl",
2929
)
3030

3131
deploydocs(;
32-
repo = "github.com/JuliaAstro/Spectra.jl.git",
32+
repo = "github.com/JuliaAstro/SpectrumBase.jl.git",
3333
devbranch = "main",
3434
push_preview = true,
3535
versions = ["stable" => "v^", "v#.#"], # Restrict to minor releases
36-
)
36+
)

docs/old_docs/fitting.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/old_docs/utils.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/src/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Spectra.jl
1+
# SpectrumBase.jl
22

33
Utilities for interfacing with astronomical spectra and synthetic spectra libraries.
44

@@ -11,9 +11,9 @@ Pages = ["index.md", "spectrum.md", "transforms.md"]
1111
From the REPL, press `]` to enter Pkg mode
1212

1313
```julia-repl
14-
pkg> add https://github.com/JuliaAstro/Spectra.jl
14+
pkg> add https://github.com/JuliaAstro/SpectrumBase.jl
1515
16-
julia> using Spectra
16+
julia> using SpectrumBase
1717
```
1818

1919
## Quick Start
@@ -23,7 +23,7 @@ Here is a quick demo of some of our features.
2323
### Spectrum construction
2424

2525
```jldoctest guide
26-
julia> using Spectra, FITSIO, Unitful, UnitfulAstro, Plots
26+
julia> using SpectrumBase, FITSIO, Unitful, UnitfulAstro, Plots
2727
2828
julia> # fitsurl = "https://dr14.sdss.org/optical/spectrum/view/data/format=fits/spec=lite?plateid=1323&mjd=52797&fiberid=12";
2929
@@ -60,14 +60,14 @@ For constructing higher dimensional spectra, e.g., for echelle or IFU spectra, s
6060
If you found this software or any derivative work useful in your academic work, I ask that you please cite the code.
6161

6262
```
63-
@misc{Spectra.jl,
63+
@misc{SpectrumBase.jl,
6464
author = {Miles Lucas and contributors},
65-
title = {Spectra.jl: Utilities for interfacing with astronomical spectra},
66-
url = {https://github.com/JuliaAstro/Spectra.jl},
65+
title = {SpectrumBase.jl: Utilities for interfacing with astronomical spectra},
66+
url = {https://github.com/JuliaAstro/SpectrumBase.jl},
6767
year = {2024}
6868
}
6969
```
7070

7171
## Contributing
7272

73-
Please see [Contributing](@ref contrib) for information on contributing and extending Spectra.jl.
73+
Please see [Contributing](@ref contrib) for information on contributing and extending SpectrumBase.jl.

docs/src/spectrum.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ Here we will go over the different spectral types and how we use them.
44

55
## Types
66

7-
Spectra are defined as possible subtypes of `AbstractSpectrum`. You can use these directly for construction, or use the catch-all [`spectrum`](@ref) function, which is preferred.
7+
SpectrumBase are defined as possible subtypes of `AbstractSpectrum`. You can use these directly for construction, or use the catch-all [`spectrum`](@ref) function, which is preferred.
88

99
```@docs
10-
Spectra.AbstractSpectrum
11-
Spectra.Spectrum
12-
Spectra.SingleSpectrum
13-
Spectra.EchelleSpectrum
14-
Spectra.IFUSpectrum
10+
SpectrumBase.AbstractSpectrum
11+
SpectrumBase.Spectrum
12+
SpectrumBase.SingleSpectrum
13+
SpectrumBase.EchelleSpectrum
14+
SpectrumBase.IFUSpectrum
1515
```
1616

1717
## Constructors
1818

1919
```@docs
20-
Spectra.spectrum
20+
SpectrumBase.spectrum
2121
```
2222

2323

@@ -27,9 +27,9 @@ For more advanced transformations, see [Transformations](@ref)
2727

2828
### Getters
2929
```@docs
30-
Spectra.spectral_axis(::AbstractSpectrum)
31-
Spectra.flux_axis(::AbstractSpectrum)
32-
Spectra.meta(::AbstractSpectrum)
30+
SpectrumBase.spectral_axis(::AbstractSpectrum)
31+
SpectrumBase.flux_axis(::AbstractSpectrum)
32+
SpectrumBase.meta(::AbstractSpectrum)
3333
```
3434

3535
### Array interface
@@ -69,7 +69,7 @@ Unitful.ustrip
6969
We provide simple plotting recipes for spectra using [Plots.jl](https://github.com/juliaplots/plots.jl)
7070

7171
```@example
72-
using Plots, Spectra
72+
using Plots, SpectrumBase
7373
7474
wave = range(1e3, 5e4, length=100)
7575
spec = blackbody(wave, 2000)

docs/src/transforms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
By leveraging [DustExtinction.jl](https://github.com/juliaastro/dustextinction.jl) we can apply common reddening laws to our spectra.
66

77
```jldoctest
8-
julia> using Spectra, Unitful, Measurements, Random
8+
julia> using SpectrumBase, Unitful, Measurements, Random
99
1010
julia> rng = Random.seed!(0);
1111
@@ -66,4 +66,4 @@ External interpolators, e.g., from [DataInterpolations.jl](https://github.com/Sc
6666

6767
```@docs
6868
SpectrumResampler
69-
```
69+
```

0 commit comments

Comments
 (0)