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

Issue in summing two custom lasers #677

Closed
dinkarm opened this issue Jan 12, 2024 · 3 comments
Closed

Issue in summing two custom lasers #677

dinkarm opened this issue Jan 12, 2024 · 3 comments

Comments

@dinkarm
Copy link

dinkarm commented Jan 12, 2024

I am trying to create a circularly polarized laser pulses using two custom laser profiles but the terminal says
Screenshot_3
any help will be appreciated. However, simulation is working perfect with single custom laser. Issue is only when I am trying to add the two laser profiles.

This is the custom laser profile I am using [https://github.com//issues/674]

@dinkarm
Copy link
Author

dinkarm commented Jan 12, 2024

I wanna add one more thing that summed laser profiles are also working perfect with laser profiles already defined in fbpic the issue is only with my custom laser profiles I have created using the structure suggested

@RemiLehe
Copy link
Member

Thanks for raising this issue.

In your Python script, could you replace this block of code:

class LaserProfile( object ):
    def __init__( self, propagation_direction, gpu_capable=False ):
        assert propagation_direction in [-1, 1]
        self.propag_direction = float(propagation_direction)
        self.gpu_capable = gpu_capable

    def E_field( self, x, y, z, t ):
        return( np.zeros_like(x), np.zeros_like(x) )

by

from fbpic.lpa_utils.laser.laser_profiles import LaserProfile

@dinkarm
Copy link
Author

dinkarm commented Jan 13, 2024

kudos @RemiLehe Its working perfect Now. Many Thanks

@dinkarm dinkarm closed this as completed Jan 13, 2024
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

No branches or pull requests

2 participants