Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging Dev1.6 for the upcoming hoki v1.6 release #76

Merged
merged 144 commits into from May 4, 2021
Merged

Merging Dev1.6 for the upcoming hoki v1.6 release #76

merged 144 commits into from May 4, 2021

Commits on Jun 2, 2020

  1. Created CSP archistecture and basic sfh class

    The complex stellar population subpackage is meant to combine bpass 
    variables with a stelalr formation history to generate more complex 
    populations. To this end, we're implementing a stellar formation history 
    class. The basic SFH class for custom SFH is implemented using scipy 
    splines. This basic class is also tested.
    maxbriel committed Jun 2, 2020
    Configuration menu
    Copy the full SHA
    4100544 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2020

  1. Configuration menu
    Copy the full SHA
    f2d0f86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6828272 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d3cc2a5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    29a8d1e View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2020

  1. Adds at_time function to the event rate class

    This method allows for the calculation of the event rate at a given lookback time. It uses the BPASS binning for this. 
    
    This method is much faster, but suffers from a lack of accuracy.
    maxbriel committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    95c6cb0 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2020

  1. Configuration menu
    Copy the full SHA
    27a8891 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0047254 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    536b6b9 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2020

  1. trying to fix tests

    HeloiseS committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    8e08702 View commit details
    Browse the repository at this point in the history
  2. tests done

    HeloiseS committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    8f97809 View commit details
    Browse the repository at this point in the history
  3. tests for search.py done

    HeloiseS committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    c10b4dd View commit details
    Browse the repository at this point in the history
  4. docstrings donegit push!

    HeloiseS committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    4a85014 View commit details
    Browse the repository at this point in the history
  5. Implements calculate spectrum at_time and over_time functions

    Both functions are implemented for the BPASS spectra. 
    However, the method is similar to the BPASS event rate calculation, which is sub optimal for the spectra calculation. It takes an extremely long time to do the calculation. A for loop of 100000 iterations is present, because each wavelength is seen as it's own "event type". It should be possible to remove this by implementing a function to take the separate wavelengths as a single unit. It would be interesting so see the influence of putting the for loop within a numba function, but thinking about restructuring the function is probably better. 
    
    Including a "caching" of the BPASS spectra into a pickled DataFrame. 
    
    
    
    Additional test files are required for this to run.
    maxbriel committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    9e95635 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f22c615 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2020

  1. fixed plot hrds

    HeloiseS committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    7b60614 View commit details
    Browse the repository at this point in the history
  2. before ceckout

    HeloiseS committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    d3a662b View commit details
    Browse the repository at this point in the history
  3. fixed hrd plot

    HeloiseS committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    e1bf600 View commit details
    Browse the repository at this point in the history
  4. adding csp folder

    HeloiseS committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    070282b View commit details
    Browse the repository at this point in the history
  5. fixed merge conflict

    HeloiseS committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    a881b36 View commit details
    Browse the repository at this point in the history
  6. minor changes

    HeloiseS committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    dfb88cb View commit details
    Browse the repository at this point in the history
  7. refactoring and renaming

    HeloiseS committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    0ff0d61 View commit details
    Browse the repository at this point in the history
  8. refactoring and renaming

    HeloiseS committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    ea38187 View commit details
    Browse the repository at this point in the history
  9. fixed my stupid

    HeloiseS committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    e1e824e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b9f480b View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2020

  1. Configuration menu
    Copy the full SHA
    9d4d49d View commit details
    Browse the repository at this point in the history
  2. added a hokitype error

    HeloiseS committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    5c1fb9a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    276c1de View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d2f93d9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    71f3604 View commit details
    Browse the repository at this point in the history
  6. Updated the tests

    maxbriel committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    36bd68b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6475bbd View commit details
    Browse the repository at this point in the history
  8. bla

    HeloiseS committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    760144d View commit details
    Browse the repository at this point in the history
  9. Update testing.yml

    HeloiseS committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    a1f6793 View commit details
    Browse the repository at this point in the history
  10. Adjust tests and docstrings

    maxbriel committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    551b8e7 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2020

  1. expanded on the starcounts.py tests and put them in the right place +…

    … added TypeError catch
    HeloiseS committed Jun 19, 2020
    Configuration menu
    Copy the full SHA
    fc6cfc9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    adc8ba3 View commit details
    Browse the repository at this point in the history
  3. Adjust eventrate functions to take lists of functions

    Instead of requiring a scipy interpolated spline as input. These functions now take a list of functions as input for the stellar formation and metallicity history. 
    
    This adjustment has been made by using `numpy.interp` instead of scipy.interpolate. Furthermore, instead of scipy's spline integration `numpy.trapz` is now used to calculate the mass per bin.
    maxbriel committed Jun 19, 2020
    Configuration menu
    Copy the full SHA
    14d7f4b View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2020

  1. Merge pull request #34 from HeloiseS/stats_tests

    Stats tests
    HeloiseS committed Jun 21, 2020
    Configuration menu
    Copy the full SHA
    822ffd4 View commit details
    Browse the repository at this point in the history
  2. fix merge comflict

    HeloiseS committed Jun 21, 2020
    Configuration menu
    Copy the full SHA
    810f560 View commit details
    Browse the repository at this point in the history
  3. Disabled spectra test

    maxbriel committed Jun 21, 2020
    Configuration menu
    Copy the full SHA
    41f4f9a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cb1f7b8 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2020

  1. Configuration menu
    Copy the full SHA
    ee720e2 View commit details
    Browse the repository at this point in the history
  2. fixing CI

    HeloiseS committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    fa26ff5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    02f820a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    23893b5 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2020

  1. upload files for remote work

    maxbriel committed Jun 23, 2020
    Configuration menu
    Copy the full SHA
    666b351 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2020

  1. Configuration menu
    Copy the full SHA
    110cdd2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5808340 View commit details
    Browse the repository at this point in the history
  3. Improve testing and functions

    - Adds BPASS IMFS to the constants
    - Adds check to BPASS IMFS
    - Adds test for `data_compiler.SpectraData`
    - Reduces data usage for rate tests
    maxbriel committed Jun 24, 2020
    Configuration menu
    Copy the full SHA
    4bc4c20 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2020

  1. Add SpectraCompiler test

    Uses `unittest.mock` to allow for a smaller DataFrame to be used.
    maxbriel committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    224af19 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9520ebd View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2020

  1. Configuration menu
    Copy the full SHA
    d24efbe View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2020

  1. Update SpectraCompiler

    The compiler now outputs the BPASS spectra as a 3D `numpy.ndarray` this minimises storage and allows for faster and less memory hungry operations than the MultiIndex pandas DataFrame. 
    
    The tests are updated accordingly and using unittest.mock a single spectra file is use. (This could be simulated too)
    maxbriel committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    9e0c487 View commit details
    Browse the repository at this point in the history
  2. Documentation update + SFH input

    The documentation now shows the size and shape of each input and output variable. 
    
    The `_over_time` and `_at_time` for `CSPSpectra` and `CSPEventRate` are now able to take the `SFH` object as an input.
    maxbriel committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    81ba83f View commit details
    Browse the repository at this point in the history
  3. Removed CSP from utils due to cyclical import

    The CSP class in `utils` was importing the SFH class, which was importing the `utils` module. Therefore, failing importing. Thus, the CSP class has been moved to a separate file
    maxbriel committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    cbd3a89 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2020

  1. Configuration menu
    Copy the full SHA
    2b08f82 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1a81f7d View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2020

  1. Configuration menu
    Copy the full SHA
    1dad9b4 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2020

  1. Configuration menu
    Copy the full SHA
    9a7429f View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2020

  1. at_time new default sample rate + load functions moved to hoki.load

    at_time now uses 1000 as the default sample rate. 
    The BPASS bins can still be used is a negative number is given. 
    The `load_spectra` and `load_rates` have been moved to `hoki.load` and renamed to `all_spectra` and `all_rates`, respectively.
    tests have been adjusted accordingly
    maxbriel committed Jul 16, 2020
    Configuration menu
    Copy the full SHA
    1d22aef View commit details
    Browse the repository at this point in the history
  2. Fixed typo

    maxbriel committed Jul 16, 2020
    Configuration menu
    Copy the full SHA
    67cc7c7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cd64e00 View commit details
    Browse the repository at this point in the history
  4. Removes cyclical import

    maxbriel committed Jul 16, 2020
    Configuration menu
    Copy the full SHA
    2a41a9a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7085eb4 View commit details
    Browse the repository at this point in the history
  6. Getting tox to work

    maxbriel committed Jul 16, 2020
    Configuration menu
    Copy the full SHA
    dca1a03 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2020

  1. private optimised mass_per_time_bin calculation

    Implements 2 new functions:
    - A custom numba trapezoidal function
    - A optimised mass_per_bin function for non-function-based data
    maxbriel committed Jul 31, 2020
    Configuration menu
    Copy the full SHA
    ece0273 View commit details
    Browse the repository at this point in the history
  2. Refactored Event Rate calculation from array data

    The original event rate calculation took functions as in input. This becomes cumbersome when you have data at specific time values. This calculation is done by taking a 2D matrix with time points on one axis and BPASS metallicities on the other. The values of the matrix describes the SFR at that moment in time. 
    
    The calculate_rate_over_time function has been adjusted to use this new function.
    maxbriel committed Jul 31, 2020
    Configuration menu
    Copy the full SHA
    bccb99f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bed60cf View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2020

  1. Utils for binning of spectra.

    Martin Glatzle committed Aug 6, 2020
    Configuration menu
    Copy the full SHA
    0cafab8 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2020

  1. Configuration menu
    Copy the full SHA
    285c508 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a8d6d72 View commit details
    Browse the repository at this point in the history
  3. Typo.

    Martin Glatzle committed Aug 25, 2020
    Configuration menu
    Copy the full SHA
    d2b2e34 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2020

  1. Merge pull request #58 from findesgh/csp

    Small bugfix in `all_spectra`
    The binary `kwarg` was not passed on to `SpectraCompiler` from `load.all_spectra`.
    maxbriel committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    94b8534 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2020

  1. Fix SpectraCompiler

    maxbriel committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    31031b9 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2020

  1. BUG: use np instead of pd in SpectraCompiler.

    Martin Glatzle committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    6bc3f73 View commit details
    Browse the repository at this point in the history
  2. BUG: fix index and make test pass.

    Martin Glatzle committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    7a54cdf View commit details
    Browse the repository at this point in the history
  3. BUG: fix another regression bug.

    Martin Glatzle committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    1e9556e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0edb23e View commit details
    Browse the repository at this point in the history
  5. Fix further regression bug.

    Martin Glatzle committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    4ec8dab View commit details
    Browse the repository at this point in the history
  6. Clean up loading module

    maxbriel committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    0a2e307 View commit details
    Browse the repository at this point in the history
  7. Updates mass per bin calculation for vectorized funciton input

    mass_per_bin now takes a normal python callable and a vectorized function as input. 
    The latter boosts performance significantly
    maxbriel committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    bdba1cb View commit details
    Browse the repository at this point in the history
  8. Renames CSPEventRate functions and adds grid functions

    - CSPEventRate functions are now called:
        - calculate_rate_over_time -> over_time
        - calculate_rate_at_time -> at_time
    new functions: 
        - grid_over_time: calculates the rates from a 2D SFH (per BPASS metallicity) from  time_points to time bins
         - grid_at_time: calculate the event rate at a specific moment in lookback time from a 2D SFH grid
    maxbriel committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    be7b9fa View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f9a5a10 View commit details
    Browse the repository at this point in the history
  10. Merge pull request #60 from findesgh/csp_fix2

    * BUG: use np instead of pd in SpectraCompiler.
    * BUG: fix index and make test pass.
    * BUG: fix another regression bug.
    * Fix further regression bug.
    
    Authored-by: Martin Glatzle <mglatzle@mpa-garching.mpg.de>
    maxbriel committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    30485f5 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0c74851 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2020

  1. Configuration menu
    Copy the full SHA
    498a3ed View commit details
    Browse the repository at this point in the history
  2. Set default sample rate for at_time

    Also includes some docstring updates
    maxbriel committed Aug 29, 2020
    Configuration menu
    Copy the full SHA
    ad2bc98 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f727fd7 View commit details
    Browse the repository at this point in the history
  4. Adds grid functions for the spectra calculation

    CSPSpectra now has the following functions: 
    Public: 
    - at_time: at time with function input
    - over_time: over lb time with function input
    - grid_at_time: at time with SFH grid input
    - grid_over_time: over lb time with SFH grid input
    Private: 
    - grid_rate_calculator_at_time
    - grid_rate_calculator_over_time
    
    The grid_rate_calculators_* are numba functions that  have the grid_* around them as wrappers for the input and output
    maxbriel committed Aug 29, 2020
    Configuration menu
    Copy the full SHA
    466efab View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2020

  1. Configuration menu
    Copy the full SHA
    a5a747e View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2020

  1. Configuration menu
    Copy the full SHA
    6e81cc0 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2020

  1. Idon't even know

    HeloiseS committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    f5886e0 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2020

  1. Bug fix in nr_time_bins (grid_over_time functions)

    Instead of N bins being created, N-1 bin was being created.
    maxbriel committed Sep 21, 2020
    Configuration menu
    Copy the full SHA
    22699a0 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2020

  1. Docs string cleanup

    maxbriel committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    9b2c46d View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2020

  1. Configuration menu
    Copy the full SHA
    7ddd2a0 View commit details
    Browse the repository at this point in the history
  2. Solve cyclical import error

    maxbriel committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    9a4c65b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a7d1203 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2020

  1. REFACTOR: wave to wl.

    findesgh committed Oct 2, 2020
    Configuration menu
    Copy the full SHA
    c96e92e View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2020

  1. yaml update

    HeloiseS committed Oct 3, 2020
    Configuration menu
    Copy the full SHA
    6779946 View commit details
    Browse the repository at this point in the history
  2. yaml update

    HeloiseS committed Oct 3, 2020
    Configuration menu
    Copy the full SHA
    cfbacab View commit details
    Browse the repository at this point in the history
  3. DOC: update to docstrings.

    findesgh committed Oct 3, 2020
    Configuration menu
    Copy the full SHA
    256ef8d View commit details
    Browse the repository at this point in the history
  4. Overhaul how bins work.

    findesgh committed Oct 3, 2020
    Configuration menu
    Copy the full SHA
    bdbccb4 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2020

  1. File check, combined data_compiler tests, renames func+variables

    renamed variables:
    - BPASS_METALLICITIES. now with `z`
    renamed functions:
    - all_rates ->  rates_all_z
    - all_spectra -> spectra_all_z
    maxbriel committed Oct 4, 2020
    Configuration menu
    Copy the full SHA
    7801d16 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2020

  1. Complex Stellar Populations (#64)

    This submodule introduces the possibility to create Complex Stellar Populations with BPASS data.
    
    The two main modules are `csp.eventrate` and `csp.spectra`
    `csp.eventrate` contains the `CSPEventRate` class, which can be used to calculate event rates from a given Stellar Formation History and Metallicity evolution.
    
    The following methods are available in this class:
    
        `at_time`: calculates the event rates at a given lookback time.
        `over_time`: calculates the event rates over a lookback time (binned).
        `grid_at_time`: alternative input. Takes a grid of points instead of a function. Does the same as at_time.
        `grid_over_time`: alternative input. Takes a grid of points instead of a function. Does the same as over_time.
    
    `csp.spectra` contains the `CSPSpectra` class, which can be used to calculate synthetic spectra for the given population.
    The same methods are available in this class as `CSPEventRate`, but provide spectra rather than even rates.
    
    `csp.sfh` contains a class with which a Stellar Formation History (SFH) can be made. A collection of common parametric SFH are available (see documentation), but a custom one can also be given.
    
    As support for these high level functions, a collection of utility and helper functions has been added. These can be found in `csp.utils`. Some these are optimised for performance (`numba` JIT compiled) and are not user friendly.
    
    * Created CSP archistecture and basic sfh class
    * Added variables to constants
    * implements utility functions & new test files
    * Implements event rate calculation over time
    * BPASS data_files for testing file_loading
    * Adds `at_time` function to the event rate class
    * Adds docstrings and extra tests
    * Implements calculate spectrum at_time and over_time functions
    * Add normalisation function for the BPASS spectrum
    * fixed hrd plot
    * adding csp folder
    * minor changes
    * Moved tests to CSP folder + fix in function name _type_check
    * added a hokitype error
    * Added some code review for Max and minor stylistic changes
    * Added some code review for Max and minor stylistic changes
    * Updated the tests
    * bla
    * Adjust tests and docstrings
    * Adjust eventrate functions to take lists of functions
    * Disabled spectra test
    * Added parametric star formation histories to SFH and refactored some variable names
    * fixing CI
    * Auto stash before merge of "csp" and "official_hoki/csp"
    * upload files for remote work
    * Improve testing and functions
    * Add SpectraCompiler test
    * Adds extensive tests for the CSP package
    * Update SpectraCompiler
    * Documentation update + SFH input
    * Removed CSP from utils due to cyclical import
    * Updated setup.cfg to include csp_test_data subfolder
    * Removes leftover print statement + prints loading precompiled failed
    * Correct metallicity mid-points
    * Added the parametric star formation histories as public functions
    * at_time new default sample rate + load functions moved to hoki.load
    * Fixed typo
    * Removes cyclical import
    * Adjusted tests that use SpectraCompiler
    * Getting tox to work
    * private optimised mass_per_time_bin calculation
    * Refactored Event Rate calculation from array data
    * Removed dependency and added more doc information
    * BUG: pass on kwarg to spectra compiler.
    * Fix SpectraCompiler
    * BUG: use np instead of pd in SpectraCompiler.
    * BUG: fix index and make test pass.
    * BUG: fix another regression bug.
    * Fix further regression bug.
    * Clean up loading module
    * Updates mass per bin calculation for vectorized funciton input
    * Renames CSPEventRate functions and adds grid functions
    * np.zeros to np.empty where possible
    * Fixed incorrect test of at_time and over_time
    * Set default sample rate for at_time
    * Adds `cache` parameter to over_time_spectrum
    * Adds grid functions for the spectra calculation
    * Adds return_time_edges to grid_over_time & bug fix sfh vectorisation
    * Bug fix in nr_time_bins (grid_over_time functions)
    * Docs string cleanup
    * Solve cyclical import error
    * Fix tox and remove corner plot
    * File check, combined data_compiler tests, renames func+variables
    
    Co-authored-by: Max Briel <max.briel@auckland.ac.nz>
    Co-authored-by: heloises <heloisefw@gmail.com>
    Co-authored-by: Heloise <HeloiseS@users.noreply.github.com>
    Co-authored-by: findesgh <findessp@yandex.ru>
    Co-authored-by: Martin Glatzle <mglatzle@mpa-garching.mpg.de>
    6 people committed Oct 5, 2020
    Configuration menu
    Copy the full SHA
    920edef View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2020

  1. Emissivity compiling and loading. (#62)

    * Created CSP archistecture and basic sfh class
    * Added variables to constants
    * implements utility functions & new test files
    * Implements event rate calculation over time
    * BPASS data_files for testing file_loading
    
    * Adds `at_time` function to the event rate class
    
    This method allows for the calculation of the event rate at a given lookback time. It uses the BPASS binning for this. 
    
    This method is much faster, but suffers from a lack of accuracy.
    
    * Adds docstrings and extra tests
    
    * Implements calculate spectrum at_time and over_time functions
    
    Both functions are implemented for the BPASS spectra. 
    However, the method is similar to the BPASS event rate calculation, which is sub optimal for the spectra calculation. It takes an extremely long time to do the calculation. A for loop of 100000 iterations is present, because each wavelength is seen as it's own "event type". It should be possible to remove this by implementing a function to take the separate wavelengths as a single unit. It would be interesting so see the influence of putting the for loop within a numba function, but thinking about restructuring the function is probably better. 
    
    Including a "caching" of the BPASS spectra into a pickled DataFrame. 
    
    
    
    Additional test files are required for this to run.
    
    * Add normalisation function for the BPASS spectrum
    
    * fixed hrd plot
    
    * adding csp folder
    
    * minor changes
    
    * Moved tests to CSP folder + fix in function name _type_check
    
    * added a hokitype error
    
    * Added some code review for Max and minor stylistic changes
    
    * Added some code review for Max and minor stylistic changes
    
    * Updated the tests
    
    * bla
    
    * Adjust tests and docstrings
    
    * Adjust eventrate functions to take lists of functions
    
    Instead of requiring a scipy interpolated spline as input. These functions now take a list of functions as input for the stellar formation and metallicity history. 
    
    This adjustment has been made by using `numpy.interp` instead of scipy.interpolate. Furthermore, instead of scipy's spline integration `numpy.trapz` is now used to calculate the mass per bin.
    
    * Disabled spectra test
    
    * Added parametric star formation histories to SFH and refactored some variable names
    
    * fixing CI
    
    * Auto stash before merge of "csp" and "official_hoki/csp"
    
    * upload files for remote work
    
    * Improve testing and functions
    
    - Adds BPASS IMFS to the constants
    - Adds check to BPASS IMFS
    - Adds test for `data_compiler.SpectraData`
    - Reduces data usage for rate tests
    
    * Add SpectraCompiler test
    
    Uses `unittest.mock` to allow for a smaller DataFrame to be used.
    
    * Adds extensive tests for the CSP package
    
    * Update SpectraCompiler
    
    The compiler now outputs the BPASS spectra as a 3D `numpy.ndarray` this minimises storage and allows for faster and less memory hungry operations than the MultiIndex pandas DataFrame. 
    
    The tests are updated accordingly and using unittest.mock a single spectra file is use. (This could be simulated too)
    
    * Documentation update + SFH input
    
    The documentation now shows the size and shape of each input and output variable. 
    
    The `_over_time` and `_at_time` for `CSPSpectra` and `CSPEventRate` are now able to take the `SFH` object as an input.
    
    * Removed CSP from utils due to cyclical import
    
    The CSP class in `utils` was importing the SFH class, which was importing the `utils` module. Therefore, failing importing. Thus, the CSP class has been moved to a separate file
    
    * Updated setup.cfg to include csp_test_data subfolder
    
    * Removes leftover print statement + prints loading precompiled failed
    
    * Correct metallicity mid-points
    
    * Added the parametric star formation histories as public functions
    
    * at_time new default sample rate + load functions moved to hoki.load
    
    at_time now uses 1000 as the default sample rate. 
    The BPASS bins can still be used is a negative number is given. 
    The `load_spectra` and `load_rates` have been moved to `hoki.load` and renamed to `all_spectra` and `all_rates`, respectively.
    tests have been adjusted accordingly
    
    * Fixed typo
    
    * Removes cyclical import
    
    * Adjusted tests that use SpectraCompiler
    
    * Getting tox to work
    
    * private optimised mass_per_time_bin calculation
    
    Implements 2 new functions:
    - A custom numba trapezoidal function
    - A optimised mass_per_bin function for non-function-based data
    
    * Refactored Event Rate calculation from array data
    
    The original event rate calculation took functions as in input. This becomes cumbersome when you have data at specific time values. This calculation is done by taking a 2D matrix with time points on one axis and BPASS metallicities on the other. The values of the matrix describes the SFR at that moment in time. 
    
    The calculate_rate_over_time function has been adjusted to use this new function.
    
    * Removed dependency and added more doc information
    
    * BUG: pass on kwarg to spectra compiler.
    
    * Fix SpectraCompiler
    
    * BUG: use np instead of pd in SpectraCompiler.
    
    * BUG: fix index and make test pass.
    
    * BUG: fix another regression bug.
    
    * Fix further regression bug.
    
    * Clean up loading module
    
    * Updates mass per bin calculation for vectorized funciton input
    
    mass_per_bin now takes a normal python callable and a vectorized function as input. 
    The latter boosts performance significantly
    
    * Renames CSPEventRate functions and adds grid functions
    
    - CSPEventRate functions are now called:
        - calculate_rate_over_time -> over_time
        - calculate_rate_at_time -> at_time
    new functions: 
        - grid_over_time: calculates the rates from a 2D SFH (per BPASS metallicity) from  time_points to time bins
         - grid_at_time: calculate the event rate at a specific moment in lookback time from a 2D SFH grid
    
    * np.zeros to np.empty where possible
    
    * Fixed incorrect test of at_time and over_time
    
    * Set default sample rate for at_time
    
    Also includes some docstring updates
    
    * Adds `cache` parameter to over_time_spectrum
    
    * Adds grid functions for the spectra calculation
    
    CSPSpectra now has the following functions: 
    Public: 
    - at_time: at time with function input
    - over_time: over lb time with function input
    - grid_at_time: at time with SFH grid input
    - grid_over_time: over lb time with SFH grid input
    Private: 
    - grid_rate_calculator_at_time
    - grid_rate_calculator_over_time
    
    The grid_rate_calculators_* are numba functions that  have the grid_* around them as wrappers for the input and output
    
    * Adds return_time_edges to grid_over_time & bug fix sfh vectorisation
    
    * Emissivity compiling and loading.
    
    * Rename func, add existence of metallicity files,  remove try/except
    
    Try/except has been replace by a if/else with a file check.
    
    * Finalise merge of `origin/dev1.6` into `data_loading`
    
    Co-authored-by: Max Briel <max.briel@auckland.ac.nz>
    Co-authored-by: heloises <heloisefw@gmail.com>
    Co-authored-by: Max Briel <max.briel@gmail.com>
    Co-authored-by: Heloise <HeloiseS@users.noreply.github.com>
    Co-authored-by: Max <14039563+maxbriel@users.noreply.github.com>
    Co-authored-by: Martin Glatzle <mglatzle@mpa-garching.mpg.de>
    7 people committed Oct 6, 2020
    Configuration menu
    Copy the full SHA
    8bbe799 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7ee73c0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4a7ddb0 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2020

  1. REFACTOR: bin_spectra to bin_luminosity.

    Martin Glatzle committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    5737d0e View commit details
    Browse the repository at this point in the history
  2. REFACTOR: move binning utils to spec.

    Martin Glatzle committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    c690259 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #52 from findesgh/rebin

    Utils for binning of spectra (in luminosity space)
    HeloiseS committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    6f272c1 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2020

  1. Configuration menu
    Copy the full SHA
    0487ae9 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2020

  1. agewwiz match 1.5

    HeloiseS committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    d9c9d96 View commit details
    Browse the repository at this point in the history
  2. updated agewiz tests

    HeloiseS committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    d5c20db View commit details
    Browse the repository at this point in the history
  3. fixed plotting bug in hrd

    HeloiseS committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    c311fad View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2020

  1. Configuration menu
    Copy the full SHA
    8330580 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2020

  1. gitignore change

    maxbriel committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    a6bf2dc View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2020

  1. Configuration menu
    Copy the full SHA
    fdef874 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d88997e View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2020

  1. Configuration menu
    Copy the full SHA
    d33e423 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2020

  1. fixed a couple of bugs

    HeloiseS committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    59102f4 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2020

  1. Configuration menu
    Copy the full SHA
    a5110cc View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2020

  1. Configuration menu
    Copy the full SHA
    7433ad8 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2021

  1. fixes?

    Heloise committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    36d4b74 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2021

  1. Merge pull request #72 from HeloiseS/agewizard_errors

    Agewizard errors
    HeloiseS committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    b6b7374 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    26e0cec View commit details
    Browse the repository at this point in the history
  3. Merge pull request #73 from HeloiseS/search

    yaml update
    HeloiseS committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    c8c19f1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4c520d7 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2021

  1. added the scipy dependency

    Heloise committed Apr 29, 2021
    Configuration menu
    Copy the full SHA
    54d0f82 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2021

  1. tox text

    Updated to install multiple python versions
    maxbriel committed Apr 30, 2021
    Configuration menu
    Copy the full SHA
    7df70a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d43e38f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ed988d View commit details
    Browse the repository at this point in the history

Commits on May 1, 2021

  1. Change CI testing

    Runs each individual python version separate
    maxbriel committed May 1, 2021
    Configuration menu
    Copy the full SHA
    9495a54 View commit details
    Browse the repository at this point in the history
  2. Clean up of testing files

    maxbriel committed May 1, 2021
    Configuration menu
    Copy the full SHA
    eb67d79 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2021

  1. Fix testing (#74)

    * Installs the requested python version (3.6 and 3.7) and uses `tox-gh-actions` to run the correct tox versions.
    
    * self import in `hoki.age.utils` fixed.
    
    * Add init files in test folders to account for similarly named test files.
    maxbriel committed May 2, 2021
    Configuration menu
    Copy the full SHA
    c866ada View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ccfb69e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6fa186c View commit details
    Browse the repository at this point in the history

Commits on May 3, 2021

  1. Configuration menu
    Copy the full SHA
    7fbb545 View commit details
    Browse the repository at this point in the history
  2. fixed merge conflict

    Heloise committed May 3, 2021
    Configuration menu
    Copy the full SHA
    8ed2d4b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cb7e809 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    65f4df3 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2021

  1. Merge pull request #75 from HeloiseS/csp_prerelease

    Complex Stellar Populations
    HeloiseS committed May 4, 2021
    Configuration menu
    Copy the full SHA
    66be4d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75406a9 View commit details
    Browse the repository at this point in the history
  3. Update setup.cfg

    HeloiseS committed May 4, 2021
    Configuration menu
    Copy the full SHA
    52eaa28 View commit details
    Browse the repository at this point in the history