Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision ac76dfef4643189a130ce18d23070bb81272a93c authored by James Nightingale on 09 July 2023, 18:01:37 UTC, committed by James Nightingale on 09 July 2023, 18:01:37 UTC
scientific workflow doc
1 parent c2f0388
  • Files
  • Changes
  • 339c669
  • /
  • welcome.py
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:ac76dfef4643189a130ce18d23070bb81272a93c
directory badge
swh:1:dir:339c66950e81a18e1af8981fcf727fefca579248
content badge
swh:1:cnt:9fa19774d5f7918acd1223f5ada82cafeaf430f8

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
welcome.py
from os import path

input(
    "\n"
    "############################################\n"
    "### AUTOFIT WORKSPACE WORKING DIRECTORY ###\n"
    "############################################\n\n"
    """
    PyAutoFit scripts assume that the `autofit_workspace` directory is the Python working directory. 
    This means  that, when you run an example script, you should run it from the `autofit_workspace` 
    as follows:


    cd path/to/autofit_workspace (if you are not already in the autofit_workspace).
    python3 scripts/overview/simple/fit.py

    The reasons for this are so that PyAutoFit can:

    - Load configuration settings from config files in the `autofit_workspace/config` folder.
    - Load example data from the `autofit_workspace/dataset` folder.
    - Output the results of models fits to your hard-disk to the `autofit/output` folder. 

    Jupyter notebooks update the current working directory to the `autofit_workspace` directory via a magicmethod.

    If you have any errors relating to importing modules, loading data or outputting results it is likely because you
    are not running the script with the `autofit_workspace` as the working directory!

    [Press Enter to continue]"""
)


import autofit as af
import matplotlib.pyplot as plt

dataset_path = path.join("dataset", "example_1d", "gaussian_x1")
data = af.util.numpy_array_from_json(file_path=path.join(dataset_path, "data.json"))
noise_map = af.util.numpy_array_from_json(
    file_path=path.join(dataset_path, "noise_map.json")
)

plt.plot(range(data.shape[0]), data)
plt.show()
plt.close()

input(
    "\n"
    "###############################\n"
    "## EXAMPLE NOISY 1D GAUSIAN ###\n"
    "###############################\n\n"
    """
    The image displayed on your screen shows noisy 1D data of a Gaussian.
    
    The example of fitting noisy 1D profiles is used throughout the autofit_workspace to illustrate the PyAutoFit
    API and the different statistical techniques and methods available.
    
    [Press Enter to continue]
    """
)

input(
    ""
    "\n"
    "###############################\n"
    "######## WORKSPACE TOUR #######\n"
    "###############################\n\n"
    """
    PyAutoFit is now set up and you can begin exploring the workspace.  We recommend new users begin by following the
    'overview_1_the_basics' notebook, which gives an overview of PyAutoFit and the workspace.

    Examples are provided as both Jupyter notebooks in the 'notebooks' folder and Python scripts in the 'scripts'
    folder. It is up to you how you would prefer to use PyAutoFit. With these folders, you can find the following
    packages:
    
    - howtofit: Jupyter notebook providing new users with a step-by-step guide on how
    to compose a model, fit it, and analyse the results.
    
    - overview: An overview of how to quickly compose and fit a model in PyAutoFit.
    
    - features: Examples of PyAutoFit's advanced modeling features such as search chaining and sensitivity mapping.
    
    Once you a familiar with the PyAutoFit API you should be ready to use it to compose and fit models for your
    model-fitting problem!
    """
)
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API