Skip to content
Commits on Source (20)
......@@ -6,20 +6,14 @@ git-tree-sha1 = "485ee0867925449198280d4af84bdb46a2a404d0"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "1.0.1"
[[Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "f1b523983a58802c4695851926203b36e28f09db"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "3.3.0"
[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
[[ArrayInterface]]
deps = ["IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"]
git-tree-sha1 = "af516010f3d8c690d2207b12445aaa45da63e9fb"
git-tree-sha1 = "a71d224f61475b93c9e196e83c17c6ac4dedacfa"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "3.1.14"
version = "3.1.18"
[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
......@@ -35,9 +29,9 @@ version = "1.1.1"
[[CFITSIO_jll]]
deps = ["Artifacts", "JLLWrappers", "LibCURL_jll", "Libdl", "Pkg"]
git-tree-sha1 = "fefc33edbecf70e452179622f548050f1899fb47"
git-tree-sha1 = "2fabb5fc48d185d104ca7ed7444b475705993447"
uuid = "b3e40c51-02ae-5482-8a39-3ace5868dcf4"
version = "3.49.0+0"
version = "3.49.1+0"
[[CMPFit]]
deps = ["Pkg", "Printf", "Test"]
......@@ -47,9 +41,9 @@ version = "0.3.3"
[[ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "b391f22252b8754f4440de1f37ece49d8a7314bb"
git-tree-sha1 = "f53ca8d41e4753c41cdafa6ec5f7ce914b34be54"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "0.9.44"
version = "0.10.13"
[[CodeTracking]]
deps = ["InteractiveUtils", "UUIDs"]
......@@ -65,9 +59,9 @@ version = "0.7.0"
[[ColorSchemes]]
deps = ["ColorTypes", "Colors", "FixedPointNumbers", "Random", "StaticArrays"]
git-tree-sha1 = "c8fd01e4b736013bc61b704871d20503b33ea402"
git-tree-sha1 = "ed268efe58512df8c7e224d2e170afd76dd6a417"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.12.1"
version = "3.13.0"
[[ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
......@@ -89,9 +83,9 @@ version = "0.3.0"
[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "e4e2b39db08f967cc1360951f01e8a75ec441cab"
git-tree-sha1 = "dc7dedc2c2aa9faf59a55c622760a25cbefbe941"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.30.0"
version = "3.31.0"
[[CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
......@@ -99,9 +93,9 @@ uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
[[ConstructionBase]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "1dc43957fb9a1574fa1b7a449e101bd1fd3a9fb7"
git-tree-sha1 = "f74e9d5388b8620b4cee35d4c5a618dd4dc547f4"
uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
version = "1.2.1"
version = "1.3.0"
[[Cosmology]]
deps = ["QuadGK", "Unitful", "UnitfulAstro"]
......@@ -115,15 +109,21 @@ uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.0.4"
[[DSP]]
deps = ["FFTW", "IterTools", "LinearAlgebra", "Polynomials", "Random", "Reexport", "SpecialFunctions", "Statistics"]
git-tree-sha1 = "2a63cb5fc0e8c1f0f139475ef94228c7441dc7d0"
deps = ["Compat", "FFTW", "IterTools", "LinearAlgebra", "Polynomials", "Random", "Reexport", "SpecialFunctions", "Statistics"]
git-tree-sha1 = "c6dc51c5597bffe9100ccea0e850dc99afeeaeeb"
uuid = "717857b8-e6f2-59f4-9121-6e50c889abd2"
version = "0.6.10"
version = "0.7.2"
[[DataAPI]]
git-tree-sha1 = "dfb3b7e89e395be1e25c2ad6d7690dc29cc53b1d"
git-tree-sha1 = "ee400abb2298bd13bfc3df1c412ed228061a2385"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.6.0"
version = "1.7.0"
[[DataFrames]]
deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "a19645616f37a2c2c3077a44bc0d3e73e13441d7"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "1.2.1"
[[DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
......@@ -180,48 +180,42 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[Distributions]]
deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
git-tree-sha1 = "a837fdf80f333415b69684ba8e8ae6ba76de6aaa"
git-tree-sha1 = "3889f646423ce91dd1055a76317e9a1d3a23fff1"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.24.18"
version = "0.25.11"
[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "9d4f64f79012636741cf01133158a54b24924c32"
deps = ["LibGit2"]
git-tree-sha1 = "a32185f5428d3986f47c2ab78b1f216d5e6cc96f"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.4"
version = "0.8.5"
[[DoubleFloats]]
deps = ["LinearAlgebra", "Polynomials", "Printf", "Quadmath", "Random", "Requires", "SpecialFunctions"]
git-tree-sha1 = "dd08915924e0869440a1b2db627b4195c5237485"
deps = ["GenericLinearAlgebra", "LinearAlgebra", "Polynomials", "Printf", "Quadmath", "Random", "Requires", "SpecialFunctions"]
git-tree-sha1 = "1c962cf7e75c09a5f1fbf504df7d6a06447a1129"
uuid = "497a8b3b-efae-58df-a0af-a86822472b78"
version = "1.1.21"
version = "1.1.23"
[[Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
[[ExprTools]]
git-tree-sha1 = "10407a39b87f29d47ebaca8edbc75d7c302ff93e"
git-tree-sha1 = "b7e3d17636b348f005f11040025ae8c6f645fe92"
uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
version = "0.1.3"
[[EzXML]]
deps = ["Printf", "XML2_jll"]
git-tree-sha1 = "0fa3b52a04a4e210aeb1626def9c90df3ae65268"
uuid = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
version = "1.1.0"
version = "0.1.6"
[[FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
git-tree-sha1 = "746f68839306977040653ebbd249e39c15420b8a"
git-tree-sha1 = "f985af3b9f4e278b1d24434cbb546d6092fca661"
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
version = "1.4.1"
version = "1.4.3"
[[FFTW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "5a0d4b6a22a34d17d53543bd124f4b08ed78e8b0"
git-tree-sha1 = "3676abafff7e4ff07bbd2c42b3d8201f31653dcc"
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
version = "3.3.9+7"
version = "3.3.9+8"
[[FITSIO]]
deps = ["CFITSIO", "Printf", "Reexport", "Tables"]
......@@ -231,24 +225,24 @@ version = "0.16.7"
[[FileIO]]
deps = ["Pkg", "Requires", "UUIDs"]
git-tree-sha1 = "cfb694feaddf4f0381ef3cc9d4c0d8fc6b7e2ea7"
git-tree-sha1 = "256d8e6188f3f1ebfa1a5d17e072a0efafa8c5bf"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.9.0"
version = "1.10.1"
[[FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
[[FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays"]
git-tree-sha1 = "31939159aeb8ffad1d4d8ee44d07f8558273120a"
git-tree-sha1 = "25b9cc23ba3303de0ad2eac03f840de9104c9253"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.11.7"
version = "0.12.0"
[[FiniteDiff]]
deps = ["ArrayInterface", "LinearAlgebra", "Requires", "SparseArrays", "StaticArrays"]
git-tree-sha1 = "f6f80c8f934efd49a286bb5315360be66956dfc4"
git-tree-sha1 = "8b3c09b56acaf3c0e581c66638b85c8650ee9dca"
uuid = "6a86dc24-6348-571c-b903-95158fe2bd41"
version = "2.8.0"
version = "2.8.1"
[[FixedPointNumbers]]
deps = ["Statistics"]
......@@ -268,6 +262,10 @@ git-tree-sha1 = "e2af66012e08966366a43251e1fd421522908be6"
uuid = "f6369f11-7733-5829-9624-2563aa707210"
version = "0.10.18"
[[Future]]
deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"
[[GFit]]
deps = ["CMPFit", "DataStructures", "Dates", "Dierckx", "Distributions", "LsqFit", "MacroTools", "PrettyTables", "Printf", "ProgressMeter", "QuadGK", "Random", "Statistics"]
path = "/home/gcalderone/.julia/dev/GFit"
......@@ -275,14 +273,20 @@ uuid = "ac42e6ba-c0bf-4fcf-827d-deea44b16255"
version = "0.1.0"
[[GFitViewer]]
deps = ["DataStructures", "DefaultApplication", "GFit", "JSON", "Pkg", "Statistics"]
deps = ["DataStructures", "DefaultApplication", "GFit", "Gnuplot", "JLD2", "JSON", "Pkg", "Statistics"]
path = "/home/gcalderone/.julia/dev/GFitViewer"
uuid = "5d93b50e-5cc7-4feb-a740-ec85257caa01"
version = "0.1.0"
[[GenericLinearAlgebra]]
deps = ["LinearAlgebra", "Printf", "Random"]
git-tree-sha1 = "ff291c1827030ffaacaf53e3c83ed92d4d5e6fb6"
uuid = "14197337-ba66-59df-a3e3-ca00e7dcff7a"
version = "0.2.5"
[[Gnuplot]]
deps = ["ColorSchemes", "ColorTypes", "Colors", "DataStructures", "REPL", "ReplMaker", "StatsBase", "StructC14N", "Test"]
git-tree-sha1 = "637ee67f78c4adb222ee11c590bd1d0a1a50ba88"
path = "/home/gcalderone/.julia/dev/Gnuplot"
uuid = "dc211083-a33a-5b79-959f-2ff34033469d"
version = "1.4.0"
......@@ -307,6 +311,12 @@ git-tree-sha1 = "323a38ed1952d30586d0fe03412cde9399d3618b"
uuid = "d8418881-c3e1-53bb-8760-2df7ec849ed5"
version = "1.5.0"
[[InvertedIndices]]
deps = ["Test"]
git-tree-sha1 = "15732c475062348b0165684ffe28e85ea8396afc"
uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f"
version = "1.0.0"
[[IterTools]]
git-tree-sha1 = "05110a2ab1fc5f932622ffea2a003221f4782c18"
uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
......@@ -317,6 +327,12 @@ git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "1.0.0"
[[JLD2]]
deps = ["DataStructures", "FileIO", "MacroTools", "Mmap", "Pkg", "Printf", "Reexport", "TranscodingStreams", "UUIDs"]
git-tree-sha1 = "4813826871754cf52607e76ad37acb36ccf52719"
uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
version = "0.4.11"
[[JLLWrappers]]
deps = ["Preferences"]
git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e"
......@@ -331,9 +347,9 @@ version = "0.21.1"
[[JuliaInterpreter]]
deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"]
git-tree-sha1 = "ece3091e3cfd35cdda08629a3755983962942f6d"
git-tree-sha1 = "31c2eee64c1eee6e8e3f30d5a03d4b5b7086ab29"
uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
version = "0.8.16"
version = "0.8.18"
[[LazyArtifacts]]
deps = ["Artifacts", "Pkg"]
......@@ -358,21 +374,15 @@ uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
[[Libiconv_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "8d22e127ea9a0917bc98ebd3755c8bd31989381e"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.16.1+0"
[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
[[LogExpFunctions]]
deps = ["DocStringExtensions", "LinearAlgebra"]
git-tree-sha1 = "1ba664552f1ef15325e68dc4c05c3ef8c2d5d885"
git-tree-sha1 = "7bd5f6565d80b6bf753738d2bc40a5dfea072070"
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
version = "0.2.4"
version = "0.2.5"
[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
......@@ -385,9 +395,9 @@ version = "2.1.0"
[[LsqFit]]
deps = ["Distributions", "ForwardDiff", "LinearAlgebra", "NLSolversBase", "OptimBase", "Random", "StatsBase"]
git-tree-sha1 = "0c33987800fbc37edf3a5fd94520e6b06783a63b"
git-tree-sha1 = "91aa1442e63a77f101aff01dec5a821a17f43922"
uuid = "2fda8390-95c7-5789-9bda-21331edee243"
version = "0.12.0"
version = "0.12.1"
[[MKL_jll]]
deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"]
......@@ -427,6 +437,12 @@ version = "0.7.1"
[[MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
[[MutableArithmetics]]
deps = ["LinearAlgebra", "SparseArrays", "Test"]
git-tree-sha1 = "3927848ccebcc165952dc0d9ac9aa274a87bfe01"
uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
version = "0.2.20"
[[NLSolversBase]]
deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"]
git-tree-sha1 = "50608f411a1e178e0129eab4110bd56efd08816f"
......@@ -446,23 +462,17 @@ git-tree-sha1 = "8f87854cc8f3685a60689d8edecaa29d2251979b"
uuid = "4d1e1d77-625e-5b40-9113-a560ec7a8ecd"
version = "1.0.0"
[[OffsetArrays]]
deps = ["Adapt"]
git-tree-sha1 = "47b443d2ccc8297a4c538f55f8fd828ad58599ab"
uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
version = "1.8.0"
[[OpenSpecFun_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b9b8b8ed236998f91143938a760c2112dceeb2b4"
git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1"
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.4+0"
version = "0.5.5+0"
[[OptimBase]]
deps = ["NLSolversBase", "Printf", "Reexport"]
git-tree-sha1 = "4c26a757fbb5b1893b7df19a44e21762d8f8e470"
git-tree-sha1 = "9cb1fee807b599b5f803809e85c81b582d2009d6"
uuid = "87e2bd06-a317-5318-96d9-3ecbac512eee"
version = "2.0.1"
version = "2.0.2"
[[OrderedCollections]]
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
......@@ -471,9 +481,9 @@ version = "1.4.1"
[[PDMats]]
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"]
git-tree-sha1 = "f82a0e71f222199de8e9eb9a09977bd0767d52a0"
git-tree-sha1 = "4dd403333bcf0909341cfe57ec115152f937d7d8"
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
version = "0.11.0"
version = "0.11.1"
[[Parsers]]
deps = ["Dates"]
......@@ -486,9 +496,15 @@ deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markd
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
[[Polynomials]]
deps = ["Intervals", "LinearAlgebra", "OffsetArrays", "RecipesBase"]
git-tree-sha1 = "0b15f3597b01eb76764dd03c3c23d6679a3c32c8"
deps = ["Intervals", "LinearAlgebra", "MutableArithmetics", "RecipesBase"]
git-tree-sha1 = "0bbfdcd8cda81b8144de4be8a67f5717e959a005"
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
version = "2.0.14"
[[PooledArrays]]
deps = ["DataAPI", "Future"]
git-tree-sha1 = "cde4ce9d6f33219465b55162811d8de8139c0414"
uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"
version = "1.2.1"
[[Preferences]]
......@@ -499,9 +515,9 @@ version = "1.2.2"
[[PrettyTables]]
deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"]
git-tree-sha1 = "b60494adf99652d220cdef46f8a32232182cc22d"
git-tree-sha1 = "0d1245a357cc61c8cd61934c07447aa569ff22e6"
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
version = "1.0.1"
version = "1.1.0"
[[Printf]]
deps = ["Unicode"]
......@@ -514,7 +530,7 @@ uuid = "92933f4c-e287-5a05-a399-4b506db050ca"
version = "1.7.1"
[[QSFit]]
deps = ["CMPFit", "Cosmology", "DSP", "DataStructures", "Dates", "DelimitedFiles", "Dierckx", "FITSIO", "GFit", "GFitViewer", "Pkg", "Printf", "Statistics", "Unitful", "UnitfulAstro"]
deps = ["CMPFit", "Cosmology", "DSP", "DataFrames", "DataStructures", "Dates", "DelimitedFiles", "Dierckx", "FITSIO", "GFit", "GFitViewer", "Gnuplot", "Pkg", "Printf", "REPL", "Statistics", "TextParse", "Unitful", "UnitfulAstro"]
path = "/home/gcalderone/.julia/dev/QSFit"
uuid = "fea25315-b951-4667-83c9-50e53efab241"
version = "0.1.0"
......@@ -545,10 +561,9 @@ uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
version = "1.1.1"
[[Reexport]]
deps = ["Pkg"]
git-tree-sha1 = "7b1d07f411bc8ddb7977ec7f377b97b158514fe0"
git-tree-sha1 = "5f6c21241f0f655da3952fd60aa18477cf96c220"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "0.2.0"
version = "1.1.0"
[[ReplMaker]]
deps = ["REPL", "Unicode"]
......@@ -564,9 +579,9 @@ version = "1.1.3"
[[Revise]]
deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"]
git-tree-sha1 = "2b95c41e53c8f429ef56de5c3718f01831141751"
git-tree-sha1 = "410bbe13d9a7816e862ed72ac119bda7fb988c08"
uuid = "295af30f-e4ad-537b-8983-00126c2a3abe"
version = "3.1.16"
version = "3.1.17"
[[Rmath]]
deps = ["Random", "Rmath_jll"]
......@@ -595,9 +610,9 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
[[SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "2ec1962eba973f383239da22e75218565c390a96"
git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "1.0.0"
version = "1.0.1"
[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
......@@ -605,21 +620,21 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
[[SpecialFunctions]]
deps = ["ChainRulesCore", "LogExpFunctions", "OpenSpecFun_jll"]
git-tree-sha1 = "c467f25b6ec4167ea3a9a4351c66c2e1cba5da33"
git-tree-sha1 = "a50550fa3164a8c46747e62063b4d774ac1bcf49"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "1.4.1"
version = "1.5.1"
[[Static]]
deps = ["IfElse"]
git-tree-sha1 = "ddec5466a1d2d7e58adf9a427ba69763661aacf6"
git-tree-sha1 = "62701892d172a2fa41a1f829f66d2b0db94a9a63"
uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
version = "0.2.4"
version = "0.3.0"
[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "c635017268fd51ed944ec429bcc4ad010bcea900"
git-tree-sha1 = "1b9a0f17ee0adde9e538227de093467348992397"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.2.0"
version = "1.2.7"
[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
......@@ -664,9 +679,9 @@ version = "1.0.1"
[[Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"]
git-tree-sha1 = "c9d2d262e9a327be1f35844df25fe4561d258dc9"
git-tree-sha1 = "8ed4a3ea724dac32670b062be3ef1c1de6773ae8"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "1.4.2"
version = "1.4.4"
[[Tar]]
deps = ["ArgTools", "SHA"]
......@@ -683,10 +698,10 @@ uuid = "e0df1984-e451-5cb5-8b61-797a481e67e3"
version = "1.0.1"
[[TimeZones]]
deps = ["Dates", "EzXML", "LazyArtifacts", "Mocking", "Pkg", "Printf", "RecipesBase", "Serialization", "Unicode"]
git-tree-sha1 = "960099aed321e05ac649c90d583d59c9309faee1"
deps = ["Dates", "Future", "LazyArtifacts", "Mocking", "Pkg", "Printf", "RecipesBase", "Serialization", "Unicode"]
git-tree-sha1 = "81753f400872e5074768c9a77d4c44e70d409ef0"
uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53"
version = "1.5.5"
version = "1.5.6"
[[TranscodingStreams]]
deps = ["Random", "Test"]
......@@ -703,9 +718,9 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
[[Unitful]]
deps = ["ConstructionBase", "Dates", "LinearAlgebra", "Random"]
git-tree-sha1 = "c6bbc170505c5ea36593a0072b61d3be8bf868ae"
git-tree-sha1 = "a981a8ef8714cba2fd9780b22fd7a469e7aaf56d"
uuid = "1986cc42-f94f-5a68-af5c-568840ba703d"
version = "1.7.0"
version = "1.9.0"
[[UnitfulAngles]]
deps = ["Dates", "Unitful"]
......@@ -725,12 +740,6 @@ git-tree-sha1 = "28807f85197eaad3cbd2330386fac1dcb9e7e11d"
uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5"
version = "0.6.2"
[[XML2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "1acf5bdf07aa0907e0a37d3718bb88d4b687b74a"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.9.12+0"
[[Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
......
......@@ -11,6 +11,7 @@ FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
GFit = "ac42e6ba-c0bf-4fcf-827d-deea44b16255"
GFitViewer = "5d93b50e-5cc7-4feb-a740-ec85257caa01"
Gnuplot = "dc211083-a33a-5b79-959f-2ff34033469d"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
QSFit = "fea25315-b951-4667-83c9-50e53efab241"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
......
......@@ -4,13 +4,15 @@ Pkg.activate(".")
Z = 0.019422
EBV = 0.077
using Revise, Statistics, Serialization, Dierckx, DataFrames
using Revise, Statistics, Dierckx, DataFrames
using QSFit, GFit, Gnuplot, GFitViewer, MyAstroUtils
using CL_1ES_1927p654
using Dates
using TextParse
import StatsBase, JLD2
mkdir("output")
path = "output-" * readlines(`git branch --show-current`)[1]
mkdir("$(path)")
epoch_filenames = Vector{String}()
for (root, dirs, files) in walkdir("AT2018zf")
for file in files
......@@ -30,8 +32,8 @@ function read_spec(epoch_id; kw...)
spec = Spectrum(Val(:ASCII), file, columns=[1,2]; label="$epoch_id: $file", kw...);
if isa(epoch_id, Number)
spec.flux ./= all_scale[epoch_id]
spec.err ./= all_scale[epoch_id]
end
spec.err .= 0.05 .* median(spec.flux);
return spec
end
......@@ -46,17 +48,17 @@ I tried 180, 200 and 250, and the [OIII] luminosity do not change
=#
spec = read_spec("B03", resolution=200.)
add_spec!(source, spec);
res = fit(source);
res = qsfit(source);
viewer(res, showcomps=[:qso_cont, :galaxy, :balmer],
filename="output/results_boller.html")
println(res.bestfit[:OIII_5007].norm.val )
# 0.00029085925218136
println(res.bestfit[:OIII_5007].norm.val / res.bestfit[:galaxy].norm.val )
# 59.406476855719376
filename="$(path)/results_boller.html")
println(res.model[:OIII_5007].norm.val )
# 0.0002913095378291511
println(res.model[:OIII_5007].norm.val / res.model[:galaxy].norm.val )
# 61.34678931179987
if !isfile("output/scale_fwhm.dat")
if !isfile("$(path)/scale_fwhm.dat")
all_scale = fill(1., length(epoch_filenames))
all_fwhm = fill(NaN,length(epoch_filenames))
for id in 1:length(epoch_filenames)
......@@ -69,27 +71,27 @@ if !isfile("output/scale_fwhm.dat")
# source.options[:host_template] = "/home/gcalderone/Mbi1.30Zm1.49T00.0700_iTp0.00_baseFe_linear_FWHM_2.51"
spec = read_spec(id)
add_spec!(source, spec);
res = fit(source);
res = qsfit(source);
viewer(res, showcomps=[:qso_cont, :galaxy, :balmer],
filename="output/results_$(id).html")
filename="$(path)/results_$(id).html")
# Update all_scale and store FWHM
@info res.bestfit[:OIII_5007].norm.val
all_scale[id] *= res.bestfit[:OIII_5007].norm.val
all_fwhm[ id] = res.bestfit[:OIII_5007].fwhm.val
@info res.model[:OIII_5007].norm.val
all_scale[id] *= res.model[:OIII_5007].norm.val
all_fwhm[ id] = res.model[:OIII_5007].fwhm.val
catch
end
end
all_scale[.!isfinite.(all_fwhm)] .= NaN
serialize("output/scale_fwhm.dat", (all_scale, all_fwhm))
JLD2.save_object("$(path)/scale_fwhm.dat", (all_scale, all_fwhm))
else
(all_scale, all_fwhm) = deserialize("output/scale_fwhm.dat")
(all_scale, all_fwhm) = JLD2.load_object("$(path)/scale_fwhm.dat")
end
@gp :prenorm "set key bottom right" "set grid" xlab="Epoch" ylab="Value" :-
@gp :- :prenorm all_scale./1e-18 "w lp t '[OIII] norm.'" :-
@gp :- :prenorm all_fwhm./1000 "w lp t '[OIII] FWHM (x1000 km/s)"
save(:prenorm, term="png size 800,600", output="output/oiii_norm_fwhm.png")
save(:prenorm, term="png size 800,600", output="$(path)/oiii_norm_fwhm.png")
w = 10 .^(2:0.01:log10(400));
r = sqrt.(400^2 .- w.^2) ./ 2.355;
......@@ -113,9 +115,9 @@ for id in 1:length(epoch_filenames)
@gp :- :allepochs x./(1+Z) y "u 1:(\$2+$id):($id) w l notit lc pal" :-
end
@gp :- :allepochs yr=[1, 29]
save(:allepochs, term="png size 800,600", output="output/all_epochs.png")
save(:allepochs, term="png size 800,600", output="$(path)/all_epochs.png")
@gp :- :allepochs xr=[4900, 5100]
save(:allepochs, term="png size 800,2000", output="output/all_epochs_zoom.png")
save(:allepochs, term="png size 800,2000", output="$(path)/all_epochs_zoom.png")
......@@ -129,64 +131,66 @@ dict_chosen_epochs = Dict(
# Can't use resolution smaller than 150 km / s otherwise some line
# will be neglected because of spectral coverage
resolution = Dict(
:lowres => 350.,
:highres => 150.)
resolution = Dict()
# :lowres => 350.,
# :highres => 150.)
job = :all
chosen_epochs = dict_chosen_epochs[job]
Nloop = 6
(all_scale, all_fwhm) = deserialize("output/scale_fwhm.dat")
(all_scale, all_fwhm) = JLD2.load_object("$(path)/scale_fwhm.dat")
for loop in 1:Nloop
file = "output/results_$(job)_$(loop).dat"
file = "$(path)/results_$(job)_$(loop).dat"
if !isfile(file)
source = QSO{q1927p654}("1ES 1927+654", Z, ebv=EBV);
source.options[:min_spectral_coverage][:OIII_5007] = 0.5
source.options[:wavelength_range] = [3500, 6900]
@gp :zoom "set grid" :-
for id in chosen_epochs
spec = read_spec(id, resolution=get(resolution, job, NaN))
add_spec!(source, spec);
@gp :- :zoom xr=[4750,5150] spec.λ ./ (1 + source.z) spec.flux "w l t '$(id)'"
end
res = multi_fit(source);
viewer(res, showcomps=[:qso_cont, :galaxy, :balmer],
filename="output/results_$(job)_$(loop).html")
viewer(res, showcomps=[:qso_cont, :galaxy, :balmer],
filename="output/results_$(job)_$(loop)_rebin4.html", rebin=4)
res = qsfit_multi(source);
JLD2.jldsave(file; res)
viewer(res, showcomps=[:qso_cont, :galaxy, :balmer], filename="$(path)/results_$(job)_$(loop).html")
viewer(res, showcomps=[:qso_cont, :galaxy, :balmer], filename="$(path)/results_$(job)_$(loop)_rebin4.html", rebin=4)
# Find best normalization for [OIII]
model2 = deepcopy(res.model);
multi2 = deepcopy(res.multi);
for id in 1:length(chosen_epochs)
for cname in collect(keys(model2[id]))
for cname in collect(keys(multi2[id]))
if cname == :OIII_5007
model2[id][cname].norm.fixed = false
multi2[id][cname].norm.fixed = false
multi2[id][cname].fwhm.fixed = true # degenerate with norm
else
freeze(model2[id], cname)
freeze(multi2[id], cname)
end
end
end
mzer = GFit.cmpfit()
mzer.config.ftol = mzer.config.gtol = mzer.config.xtol = 1.e-6
bestfit2 = fit!(model2, source.data, minimizer=mzer);
bestfit2 = fit!(res.source, multi2, res.pspecs)
OIII_norm = fill(0., length(chosen_epochs))
for id in 1:length(chosen_epochs)
OIII_norm[id] = bestfit2[id][:OIII_5007].norm.val
all_scale[chosen_epochs[id]] *= bestfit2[id][:OIII_5007].norm.val
OIII_norm[id] = multi2[id][:OIII_5007].norm.val
all_scale[chosen_epochs[id]] *= ((1 + multi2[id][:OIII_5007].norm.val) / 2)
end
serialize(file, (res, all_scale, OIII_norm))
JLD2.jldsave(file; res, all_scale, OIII_norm)
else
(res, all_scale, OIII_norm) = deserialize(file);
# res = JLD2.load(file, "res")
# all_scale = JLD2.load(file, "all_scale")
# OIII_norm = JLD2.load(file, "OIII_norm")
res, all_scale, OIII_norm = values(JLD2.load(file));
end
end
OIII_norm_evol = fill(NaN, length(chosen_epochs))
for loop in 1:Nloop
file = "output/results_$(job)_$(loop).dat"
(res, all_scale, OIII_norm) = deserialize(file);
file = "$(path)/results_$(job)_$(loop).dat"
res, all_scale, OIII_norm = values(JLD2.load(file))
OIII_norm_evol = hcat(OIII_norm_evol, OIII_norm)
println(res.bestfit.cost / res.bestfit.dof)
println(res.fitres.fitstat / res.fitres.dof)
end
OIII_norm_evol = OIII_norm_evol[:,2:end]
@gp "set grid" :-
......@@ -231,7 +235,7 @@ tab = DataFrame(epoch=Int[], date=String[], instr=String[], galaxy=Float64[],
na_Hb_norm=Float64[], na_Hb_fwhm=Float64[], na_Hb_voff=Float64[],
oiii_fwhm=Float64[], oiii_voff=Float64[])
for id in 1:length(res.bestfit.preds)
for id in 1:length(res.bestfit.models)
push!(tab,
(id, epoch_filenames[chosen_epochs[id]][27:end-4], "",
res.bestfit[id][:galaxy].norm.val,
......@@ -247,8 +251,8 @@ for id in 1:length(res.bestfit.preds)
res.bestfit[id][:OIII_5007].fwhm.patched, res.bestfit[id][:OIII_5007].voff.patched))
end
tab[!, :l3500] .= [3500 .* Spline1D(domain(res.model[id])[:], res.model[id]())(3500.) for id in 1:length(chosen_epochs)]
tab[!, :l5100] .= [5100 .* Spline1D(domain(res.model[id])[:], res.model[id]())(5100.) for id in 1:length(chosen_epochs)]
tab[!, :l3500] .= [3500 .* Spline1D(domain(res.multi[id])[:], res.multi[id]())(3500.) for id in 1:length(chosen_epochs)]
tab[!, :l5100] .= [5100 .* Spline1D(domain(res.multi[id])[:], res.multi[id]())(5100.) for id in 1:length(chosen_epochs)]
tab[!, :Ha] .= tab.br_Ha_norm .+ tab.bb_Ha_norm .+ tab.na_Ha_norm
tab[!, :Hb] .= tab.br_Hb_norm .+ tab.bb_Hb_norm .+ tab.na_Hb_norm
......@@ -267,7 +271,7 @@ for i in 1:nrow(tab)
tab[i, :instr] = tmp[j, :Inst]
end
f = FITS("1ES_1927p654_results_$(job).fits", "w")
f = FITS("$(path)/1ES_1927p654_results_$(job).fits", "w")
write(f, tab)
close(f)
......@@ -278,7 +282,7 @@ for i in 1:nrow(tab)
isnothing(j) && continue
tab[i, :pt] = j
end
cm = countmap(tab.instr)
cm = StatsBase.countmap(tab.instr)
setindex!.(Ref(cm), 1:length(cm), collect(keys(cm))[sortperm(collect(values(cm)), rev=true)])
tab.pt .= getindex.(Ref(cm), tab.instr)
......@@ -309,16 +313,16 @@ for i in 1:nrow(tab)
ss = "w l t '$(tab[i, :date])' dt $(tab[i, :pt]) lw 2"
@gp :- domain(res.model[i])[:] res.model[i](:qso_cont) ss
end
save(:prenorm, term="png size 800,600", output="output/evolution.png")
save(:prenorm, term="png size 800,600", output="$(path)/evolution.png")
@gp "set grid"
for i in 1:length(chosen_epochs)
println(res.bestfit[i][:OIII_5007])
x = domain(res.model[i])[:]
y = res.model[i]()
y0 = y .- res.model[i](:OIII_5007)
x = domain(res.multi[i])[:]
y = res.multi[i]()
y0 = y .- res.multi[i](:OIII_5007)
ss = "w l t '$(tab[i, :date])' dt $(tab[i, :pt]) lw 2"
@gp :- x y .- Spline1D(x, y0)(5007.) ss
end
save(:prenorm, term="png size 800,600", output="output/evolution_oiii_norm.png")
save(:prenorm, term="png size 800,600", output="$(path)/evolution_oiii_norm.png")
module CL_1ES_1927p654
using QSFit, DataStructures, GFit, Statistics, Dierckx
import QSFit: AbstractSpectralLine, DefaultRecipe, CombinedLine, NarrowLine, BroadLine, BroadBaseLine, ComboBroadLine,
default_options, qso_cont_component, line_component, line_group_name, known_spectral_lines, fit, multi_fit, spectral_coverage, reduce
import QSFit: DefaultRecipe,
default_options, known_spectral_lines, LineComponent,
add_qso_continuum!, add_patch_functs!, guess_emission_lines!, qsfit_multi
abstract type q1927p654 <: DefaultRecipe end
......@@ -22,63 +24,233 @@ function default_options(::Type{T}) where T <: q1927p654
end
function qso_cont_component(::Type{T}) where T <: q1927p654
comp = qso_cont_component(supertype(T))
function QSFit.add_qso_continuum!(source::QSO{T}, pspec::PreparedSpectrum, model::Model) where T <: q1927p654
λ = domain(model)[:]
comp = QSFit.powerlaw(3000)
comp.x0.val = median(λ)
comp.norm.val = Spline1D(λ, pspec.data.val, k=1, bc="error")(comp.x0.val)
comp.alpha.val = -1.5
comp.alpha.low = -5
comp.alpha.high = 5
return comp
model[:qso_cont] = comp
push!(model[:Continuum].list, :qso_cont)
evaluate!(model)
end
function known_spectral_lines(source::QSO{T}) where T <: q1927p654
list = [
# MultiCompLine( :Lyb , [BroadLine, NarrowLine]),
MultiCompLine( :Lya , [BroadLine, NarrowLine]),
NarrowLine( :NV_1241 ),
BroadLine( custom_transition(tid=:OI_1306 , 1305.53 )),
BroadLine( custom_transition(tid=:CII_1335 , 1335.31 )),
BroadLine( :SiIV_1400 ),
MultiCompLine( :CIV_1549 , [BroadLine, NarrowLine]),
# BroadLine( :HeII_1640 ),
# BroadLine( custom_transition(tid=:OIII , 1665.85 )),
# BroadLine( custom_transition(tid=:AlIII , 1857.4 )),
BroadLine( :CIII_1909 ),
BroadLine( custom_transition(tid=:CII , 2326.0 )),
BroadLine( custom_transition(tid=:F2420 , 2420.0 )),
MultiCompLine( :MgII_2798 , [BroadLine, NarrowLine]),
# NarrowLine( custom_transition(tid=:NeVN , 3346.79 )),
NarrowLine( custom_transition(tid=:NeVI_3426 , 3426.85 )),
NarrowLine( custom_transition(tid=:OII_3727 , 3729.875)),
NarrowLine( custom_transition(tid=:NeIII_3869 , 3869.81 )),
# BroadLine( :Hd ),
MultiCompLine( :Hg , [BroadLine, NarrowLine, BroadBaseLine]),
NarrowLine( :OIII_4363 ),
BroadLine( :HeII_4686 ),
MultiCompLine( :Hb , [BroadLine, NarrowLine, BroadBaseLine]),
NarrowLine( :OIII_4959 ),
NarrowLine( :OIII_5007 ),
# AsymmTailLine( :OIII_5007 , :blue),
BroadLine( :HeI_5876 ),
NarrowLine( :OI_6300 ),
NarrowLine( :OI_6364 ),
NarrowLine( :NII_6549 ),
MultiCompLine( :Ha , [BroadLine, NarrowLine, BroadBaseLine]),
NarrowLine( :NII_6583 ),
NarrowLine( :SII_6716 ),
NarrowLine( :SII_6731 )]
return list
end
function QSFit.add_patch_functs!(source::QSO{T}, pspec::PreparedSpectrum, model::Model) where T <: q1927p654
QSFit.add_patch_functs!(parent_recipe(source), pspec, model)
# Force Hg and Hb lines to have the same shape as Ha
model[:Ha_br].norm.low = 1.e-10 # avoid division by zero
struct AsymmNarrowLine <: AbstractSpectralLine
λ::Float64
@patch! begin
model[:Hg_na].norm = model[:Hg_br].norm * (model[:Ha_na].norm / model[:Ha_br].norm)
model[:Hg_na].voff = model[:Ha_na].voff
model[:Hg_na].fwhm = model[:Ha_na].fwhm
model[:Hg_bb].norm = model[:Hg_br].norm * (model[:Ha_bb].norm / model[:Ha_br].norm)
model[:Hg_bb].voff = model[:Ha_bb].voff
model[:Hg_bb].fwhm = model[:Ha_bb].fwhm
model[:Hg_br].voff = model[:Ha_br].voff
model[:Hg_br].fwhm = model[:Ha_br].fwhm
end
@patch! begin
model[:Hb_na].norm = model[:Hb_br].norm * (model[:Ha_na].norm / model[:Ha_br].norm)
model[:Hb_na].voff = model[:Ha_na].voff
model[:Hb_na].fwhm = model[:Ha_na].fwhm
model[:Hb_bb].norm = model[:Hb_br].norm * (model[:Ha_bb].norm / model[:Ha_br].norm)
model[:Hb_bb].voff = model[:Ha_bb].voff
model[:Hb_bb].fwhm = model[:Ha_bb].fwhm
model[:Hb_br].voff = model[:Ha_br].voff
model[:Hb_br].fwhm = model[:Ha_br].fwhm
end
end
line_group_name(::Type{T}, name::Symbol, line::AsymmNarrowLine) where T <: q1927p654 = :NarrowLines
function known_spectral_lines(::Type{T}) where T <: q1927p654
list = OrderedDict{Symbol, AbstractSpectralLine}()
#list[:Lyb ] = CombinedLine( 1026.0 )
list[:Lya ] = CombinedLine( 1215.24 )
list[:NV_1241 ] = NarrowLine( 1240.81 )
list[:OI_1306 ] = BroadLine( 1305.53 )
list[:CII_1335 ] = BroadLine( 1335.31 )
list[:SiIV_1400 ] = BroadLine( 1399.8 )
list[:CIV_1549 ] = CombinedLine( 1549.48 )
#list[:HeII ] = BroadLine( 1640.4 )
#list[:OIII ] = BroadLine( 1665.85 )
#list[:AlIII ] = BroadLine( 1857.4 )
list[:CIII_1909 ] = BroadLine( 1908.734)
list[:CII ] = BroadLine( 2326.0 )
list[:F2420 ] = BroadLine( 2420.0 )
list[:MgII_2798 ] = CombinedLine( 2799.117)
#list[:NeVN ] = NarrowLine( 3346.79 )
list[:NeVI_3426 ] = NarrowLine( 3426.85 )
list[:OII_3727 ] = NarrowLine( 3729.875)
list[:NeIII_3869 ] = NarrowLine( 3869.81 )
#list[:Hd ] = BroadLine( 4102.89 )
list[:Hg ] = CombinedLine( 4341.68 )
list[:bb_Hg ] = BroadBaseLine( 4341.68 )
list[:OIII_4363 ] = NarrowLine( 4363.00 ) # TODO: Check wavelength is correct
list[:HeII ] = BroadLine( 4686. )
list[:Hb ] = CombinedLine( 4862.68 )
list[:bb_Hb ] = BroadBaseLine( 4862.68 )
list[:OIII_4959 ] = NarrowLine( 4960.295)
list[:OIII_5007 ] = NarrowLine( 5008.240) # AsymmNarrowLine
#list[:OIII_5007_bw] = NarrowLine( 5008.240)
list[:HeI_5876 ] = BroadLine( 5877.30 )
list[:OI_6300 ] = NarrowLine( 6300.00 ) # TODO: Check wavelength is correct
list[:OI_6364 ] = NarrowLine( 6364.00 ) # TODO: Check wavelength is correct
list[:NII_6549 ] = NarrowLine( 6549.86 )
list[:Ha ] = CombinedLine( 6564.61 )
list[:bb_Ha ] = BroadBaseLine( 6564.61 )
list[:NII_6583 ] = NarrowLine( 6585.27 )
list[:SII_6716 ] = NarrowLine( 6718.29 )
list[:SII_6731 ] = NarrowLine( 6732.67 )
return list
function qsfit_multi(source::QSO{TRecipe}; ref_id=1) where TRecipe <: q1927p654
elapsed = time()
@assert length(source.specs) > 1
@assert 1 <= ref_id <= length(source.specs)
pspecs = [PreparedSpectrum(source, id=id) for id in 1:length(source.specs)]
multi = MultiModel()
println(logio(source), "\nFit continuum components...")
for id in 1:length(pspecs)
pspec = pspecs[id]
model = Model(pspec.domain)
model[:Continuum] = SumReducer([])
model[:main] = SumReducer([])
push!(model[:main].list, :Continuum)
select_reducer!(model, :main)
delete!(model.revals, :default_sum)
# TODO if source.options[:instr_broadening]
# TODO GFit.set_instr_response!(model[1], (l, f) -> instrumental_broadening(l, f, source.spectra[id].resolution))
# TODO end
QSFit.add_qso_continuum!(source, pspec, model)
QSFit.add_host_galaxy!(source, pspec, model)
QSFit.add_balmer_cont!(source, pspec, model)
push!(multi, model)
if id != ref_id
@patch! multi[id][:galaxy].norm = multi[ref_id][:galaxy].norm
end
end
fitres = fit!(source, multi, pspecs)
for id in 1:length(pspecs)
model = multi[id]
pspec = pspecs[id]
QSFit.renorm_cont!(source, pspec, model)
freeze(model, :qso_cont)
haskey(model, :galaxy) && freeze(model, :galaxy)
haskey(model, :balmer) && freeze(model, :balmer)
evaluate!(model)
end
evaluate!(multi)
println(logio(source), "\nFit iron templates...")
for id in 1:length(pspecs)
model = multi[id]
pspec = pspecs[id]
model[:Iron] = SumReducer([])
push!(model[:main].list, :Iron)
QSFit.add_iron_uv!( source, pspec, model)
QSFit.add_iron_opt!(source, pspec, model)
if length(model[:Iron].list) > 0
fitres = fit!(source, model, pspec)
haskey(model, :ironuv ) && freeze(model, :ironuv)
haskey(model, :ironoptbr) && freeze(model, :ironoptbr)
haskey(model, :ironoptna) && freeze(model, :ironoptna)
end
evaluate!(model)
end
evaluate!(multi)
println(logio(source), "\nFit known emission lines...")
for id in 1:length(pspecs)
model = multi[id]
pspec = pspecs[id]
QSFit.add_emission_lines!(source, pspec, model)
guess_emission_lines!(source, pspec, model)
QSFit.add_patch_functs!(source, pspec, model)
multi[id][:OIII_5007].norm.val = 1.
multi[id][:OIII_5007].norm.fixed = true
end
fitres = fit!(source, multi, pspecs)
for id in 1:length(pspecs)
model = multi[id]
pspec = pspecs[id]
for lname in keys(pspec.lcs)
freeze(model, lname)
end
end
evaluate!(multi)
println(logio(source), "\nFit unknown emission lines...")
for id in 1:length(pspecs)
model = multi[id]
pspec = pspecs[id]
QSFit.add_unknown_lines!(source, pspec, model)
end
evaluate!(multi)
println(logio(source), "\nLast run with all parameters free...")
for id in 1:length(pspecs)
model = multi[id]
pspec = pspecs[id]
thaw(model, :qso_cont)
haskey(model, :galaxy ) && thaw(model, :galaxy)
haskey(model, :balmer ) && thaw(model, :balmer)
haskey(model, :ironuv ) && thaw(model, :ironuv)
haskey(model, :ironoptbr) && thaw(model, :ironoptbr)
haskey(model, :ironoptna) && thaw(model, :ironoptna)
for lname in keys(pspec.lcs)
thaw(model, lname)
end
for j in 1:source.options[:n_unk]
cname = Symbol(:unk, j)
if model[cname].norm.val > 0
thaw(model, cname)
else
freeze(model, cname)
end
end
end
fitres = fit!(source, multi, pspecs)
rerun = false
for id in 1:length(pspecs)
model = multi[id]
pspec = pspecs[id]
rerun = rerun || QSFit.neglect_weak_features!(source, pspec, model, fitres)
end
if rerun
println(logio(source), "\nRe-run fit...")
fitres = fit!(source, multi, pspecs)
end
println(logio(source))
show(logio(source), fitres)
out = QSFit.QSFitMultiResults(source, pspecs, multi, fitres)
elapsed = time() - elapsed
println(logio(source), "\nElapsed time: $elapsed s")
close_logio(source)
return out
end
#=
function line_component(::Type{T}, line::AsymmNarrowLine) where T <: q1927p654
comp = QSFit.SpecLineAsymmGauss(line.λ)
......@@ -101,7 +273,7 @@ function line_component(::Type{T}, line::ComboBroadLine) where T <: q1927p654
end
=#
include("Recipe_single.jl")
include("Recipe_multi.jl")
# include("Recipe_single.jl")
# include("Recipe_multi.jl")
end
This diff is collapsed.
This diff is collapsed.