COSMIC-PopSynth / COSMIC

COSMIC (Compact Object Synthesis and Monte Carlo Investigation Code)
GNU General Public License v3.0
47 stars 59 forks source link

Qmin new #454

Closed katiebreivik closed 3 years ago

katiebreivik commented 3 years ago

this sets qmin to be a variable and if qmin < 0, it is set to 0.1 for M1 < 5 Msun and to the minimum time allowed by pre-MS lifetimes for M1 > 5 Msun

scottcoughlin2014 commented 3 years ago

@katiebreivik it appears that your import of interp1d is wrong? maybe missing from scipy.interpolate import interp1d?

/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/cosmic/sample/sampler/independent.py in sample_secondary(self, primary_mass, qmin)
    335                             [175.40000000000003, 0.01962264150943399],
    336                             [200.20000000000005, 0.017358490566037776]])
--> 337             from scipy import interp1d
    338             qmin_interp = interp1d(dat[:,0], dat[:,1])
    339             q = np.ones_like(primary_mass) * 0.1

ImportError: cannot import name 'interp1d'
<<<-------------------------------------------------------------------------
codecov[bot] commented 3 years ago

Codecov Report

Merging #454 into develop will decrease coverage by 1.59%. The diff coverage is 3.42%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #454      +/-   ##
===========================================
- Coverage    32.10%   30.52%   -1.59%     
===========================================
  Files           38       39       +1     
  Lines         7610     7937     +327     
===========================================
- Hits          2443     2422      -21     
- Misses        5167     5515     +348     
Impacted Files Coverage Δ
cosmic/MC_samp.py 0.00% <0.00%> (ø)
cosmic/Match.py 0.00% <0.00%> (ø)
cosmic/bse_utils/zcnsts.py 0.00% <0.00%> (ø)
cosmic/bse_utils/zdata.py 0.00% <0.00%> (ø)
cosmic/checkstate.py 0.00% <0.00%> (ø)
cosmic/evolve.py 0.00% <0.00%> (ø)
cosmic/filter.py 0.00% <0.00%> (ø)
cosmic/plotting.py 0.00% <0.00%> (ø)
cosmic/sample/__init__.py 0.00% <0.00%> (ø)
cosmic/sample/cmc/elson.py 0.00% <0.00%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f01fe65...32716b5. Read the comment docs.