forked from substellar/brewster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbensconv.py
36 lines (17 loc) · 847 Bytes
/
bensconv.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import numpy as np
from bbconv import prism
from bbconv import convfwhm
from bbconv import convr
#**************************************************************************
# This hides the fortran convolution code so it works nicely with rest of
# code
#**************************************************************************
def prism_non_uniform(obspec,modspec,resel):
fluxout = prism(np.asfortranarray(obspec),np.asfortranarray(modspec),resel)[0:obspec[0,:].size]
return fluxout
def conv_uniform_FWHM(obspec,modspec,fwhm):
fluxout = convfwhm(np.asfortranarray(obspec),np.asfortranarray(modspec),fwhm)[0:obspec[0,:].size]
return fluxout
def conv_uniform_R(obspec,modspec,R):
fluxout = convr(np.asfortranarray(obspec),np.asfortranarray(modspec),R)[0:obspec[0,:].size]
return fluxout