Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python function called integrateSpectrum . The first few lines of its definition are outlined here. Its up to you to fill in the

Write a Python function called

integrateSpectrum

. The first few lines of its definition

are outlined here. Its up to you to fill in the rest of the function with code:

def integrateSpectrum(wavelengths, fluxes, w_lower, w_upper):

"""

This function performs a numerical integral of a spectrum.

Arguments:

wavelengths = a numpy array of wavelengths, in nanometers

fluxes = a numpy array of fluxes, corresponding to w

w_lower = the lower wavelength limit of the integration

w_upper = the upper wavelength limit of the integration

Returns:

the integral of fluxes, with wavelength limits from w_lower to w_upper

(this should be one floating point number)

"""

# now you write the rest

Im having issues on how to write the rest of the function.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

1. Several sides (two or more) are involved.

Answered: 1 week ago