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

absorptionCoefficient_Generic: allow initialization of Xsect with other datatype than float #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Leberwurscht
Copy link

The profile=... argument of absorptionCoefficient_Generic in principle allows to supply custom line profiles. We would like to use that for complex-valued profiles, so that the phase upon transmission through a medium can also be calculated - however, this won't work currently because of the line

Xsect = zeros(number_of_points)

where Xsect is initialized as real-valued type. An easy fix would be to allow to initialize Xsect with an optional keyword argument, like suggested in this pull request.

This would allow the user to initialize Xsect manually and thus permit several additional use cases:

  • returning complex crosssections
  • in-place addition of a new molecule to an existing crossection spectrum
  • initialize Xsect with a Python class that fakes to be a numpy array, but records the data of each individual line separately (which we also plan to use so that we can directly synthesize impulse responses in the time domain)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant