- This topic has 15 replies, 3 voices, and was last updated 2 years ago by Sawyer Ge.
-
AuthorPosts
-
-
October 3, 2022 at 11:58 am #79896Claudette ozaMember
Hello here, Please I need some help. I’m texting codes for co-simulation between Optisystem 15 and Python but while running the code I get a CIDF Scheduler error (see image erreur_code). I’m texting the PythonExample_ParallelToSerialConverterComponent.osd
Can you help me fixing this please? Thank you in advance -
October 3, 2022 at 12:02 pm #80905Ahmad AtiehModerator
Dear Claudette,
please refer to the readme files (Python Examples Calculation Instruction Readme file.txt and readme.txt) in the example library at the following location for guidance how to run python files.
C:UsersUSER NAMEDocumentsOptiSystem 19.0 SamplesPythonScripts
regards,
Ahmad -
October 3, 2022 at 12:02 pm #83509Ahmad AtiehModerator
Dear Claudette,
please refer to the readme files (Python Examples Calculation Instruction Readme file.txt and readme.txt) in the example library at the following location for guidance how to run python files.
C:UsersUSER NAMEDocumentsOptiSystem 19.0 SamplesPythonScripts
regards,
Ahmad -
October 6, 2022 at 5:58 pm #80907Lonny BlaineMember
Hello thank you for your answer. Please I want to know if the version of python in the readme is necessarly the one I have to use with the anaconda. Because I’ve downloaded the latest version of anaconda with python 3.9.12. And after that I’ve tried to run the code but it was not working.
And apart from the anaconda do I have to download something else ? Because most of the requirement where already in the anaconda I’ve installed.Thank you in advance for your answer
-
October 6, 2022 at 5:58 pm #83511Lonny BlaineMember
Hello thank you for your answer. Please I want to know if the version of python in the readme is necessarly the one I have to use with the anaconda. Because I’ve downloaded the latest version of anaconda with python 3.9.12. And after that I’ve tried to run the code but it was not working.
And apart from the anaconda do I have to download something else ? Because most of the requirement where already in the anaconda I’ve installed.Thank you in advance for your answer
-
October 7, 2022 at 7:44 pm #80911Ahmad AtiehModerator
Hello Claudette,
you need to use Python version 3.87.
regards,
Ahmad -
October 7, 2022 at 7:44 pm #83515Ahmad AtiehModerator
Hello Claudette,
you need to use Python version 3.87.
regards,
Ahmad -
October 10, 2022 at 4:12 pm #80917Lonny BlaineMember
Thank you for your help. It’s working now.
-
October 10, 2022 at 4:12 pm #83521Lonny BlaineMember
Thank you for your help. It’s working now.
-
October 24, 2022 at 9:55 am #80929Lonny BlaineMember
Hello, hope you’re doing well. Please another issue. When I run a code in Optisystem with python co-simulation I don’t have a command window that can help me checking my values such as the command window of Matlab. Is there any way to have check my python script variable in a co-simulation with Optisystem? Thank you in advance;
-
October 24, 2022 at 9:55 am #83533Lonny BlaineMember
Hello, hope you’re doing well. Please another issue. When I run a code in Optisystem with python co-simulation I don’t have a command window that can help me checking my values such as the command window of Matlab. Is there any way to have check my python script variable in a co-simulation with Optisystem? Thank you in advance;
-
October 24, 2022 at 9:33 pm #80931Ahmad AtiehModerator
Hello Claudette,
There is no command window in OptiSystem software like Matlab.
You may have extra outputs for the Python Component where you could monitor the output at different positions in your code using the different visualizers in OptiSystem.
Regards,
Ahmad -
October 24, 2022 at 9:33 pm #83535Ahmad AtiehModerator
Hello Claudette,
There is no command window in OptiSystem software like Matlab.
You may have extra outputs for the Python Component where you could monitor the output at different positions in your code using the different visualizers in OptiSystem.
Regards,
Ahmad -
November 5, 2022 at 4:45 pm #80953Lonny BlaineMember
Hello, hope you’re doing well.
I’m trying this time to recuperate the optical Sampled signal from a laser via a python code. Can you help me please?
In the caption you can see via the component “View Signal Visualizer” the datas I’m trying to recuparate in the python code.
My priority is mostly the complex datas displaying in the signal VisualizerThank you in advance for your support
-
November 5, 2022 at 4:45 pm #83557Lonny BlaineMember
Hello, hope you’re doing well.
I’m trying this time to recuperate the optical Sampled signal from a laser via a python code. Can you help me please?
In the caption you can see via the component “View Signal Visualizer” the datas I’m trying to recuparate in the python code.
My priority is mostly the complex datas displaying in the signal VisualizerThank you in advance for your support
-
November 7, 2022 at 1:04 pm #80955Ahmad AtiehModerator
Hello Claudette,
could you please explain why do you need to use Python to get the data, although you may download the data using .txt or .csv file format?
Regards,
Ahmad -
November 7, 2022 at 1:04 pm #83559Ahmad AtiehModerator
Hello Claudette,
could you please explain why do you need to use Python to get the data, although you may download the data using .txt or .csv file format?
Regards,
Ahmad -
November 8, 2022 at 4:57 am #80957Lonny BlaineMember
I writing a python code in cosimulation with Optisystem and the code needs these datas at each calculation(run). The solution of copying in a txt file is not dynamic. If you could help me with a way to recuperate theses informations in the python code.
I’ve used your examples of cosimulation between and optisystem and in the file attached below, objOSignal is the signal in which I should be able to recuperate the datas I’ve shown you in the previous message. -
November 8, 2022 at 4:57 am #83561Lonny BlaineMember
I writing a python code in cosimulation with Optisystem and the code needs these datas at each calculation(run). The solution of copying in a txt file is not dynamic. If you could help me with a way to recuperate theses informations in the python code.
I’ve used your examples of cosimulation between and optisystem and in the file attached below, objOSignal is the signal in which I should be able to recuperate the datas I’ve shown you in the previous message. -
November 10, 2022 at 9:44 pm #80961Lonny BlaineMember
Hello, any update please ?
-
November 10, 2022 at 9:44 pm #83565Lonny BlaineMember
Hello, any update please ?
-
November 11, 2022 at 3:10 pm #80963Willis GleasonMember
Hi Claudette,
Before you can retrieve data from the signal you first have to ensure that you calculated the project
mydocument.CalculateProject(True, True)
or
mydocument.CalculateAllSweepIterations(True, True)depending on what type of simulation you are running.
Then to send the data to a .txt file dynamically you can assign a value to a file location, ex. file = open(“SomeFilePath”),’w’), and then in a loop file.write(objSignal) to export the data.
An example of this can be found in OptiSystemSDK_General (SDK_Result.py or SDK_OutputPort.py)
Another possibility for why it isn’t working is that objOpticalSignalInput1 is not defined. If its copy and pasted from an example you would have to ensure that all variables are defined somewhere. ex objOpticalSignalInput1 = GetSampledSignalSignal()
If you’re still having troubles you can either send me the exact error message or I can take a look at the code for you and debug it.
Regards,
Alex -
November 11, 2022 at 3:10 pm #83567Willis GleasonMember
Hi Claudette,
Before you can retrieve data from the signal you first have to ensure that you calculated the project
mydocument.CalculateProject(True, True)
or
mydocument.CalculateAllSweepIterations(True, True)depending on what type of simulation you are running.
Then to send the data to a .txt file dynamically you can assign a value to a file location, ex. file = open(“SomeFilePath”),’w’), and then in a loop file.write(objSignal) to export the data.
An example of this can be found in OptiSystemSDK_General (SDK_Result.py or SDK_OutputPort.py)
Another possibility for why it isn’t working is that objOpticalSignalInput1 is not defined. If its copy and pasted from an example you would have to ensure that all variables are defined somewhere. ex objOpticalSignalInput1 = GetSampledSignalSignal()
If you’re still having troubles you can either send me the exact error message or I can take a look at the code for you and debug it.
Regards,
Alex -
November 23, 2022 at 3:08 pm #80969Lonny BlaineMember
Hello, me again with another problem with python cosimulation with Optisystem.
My python code is compiling well but do not communicate with the rest of the optisystem code. Going through an optical fiber, the optisystem compilation was ongoing for 6hours and didn’t finish since. To see if the problem is with the output of my code, I have compiled (run) the program and sent the input signal at the output port the python code compile (run) well as always but the optisystem compilation through the fiber is still not working or will take at least 8min before finishing.
Can you help me finding what is the problem? Is it a problem of storage not supported by optisystem regarding my python code or something else ? And how can I fix it ?
Thank you in advancePs: Even when I suppress my python code adds, and just set the code as a bridge (input=output), the compilation with the fiber will take at least 8minutes before working when usually it’sa matter of 5 to 10 secondes.
-
November 23, 2022 at 3:08 pm #83573Lonny BlaineMember
Hello, me again with another problem with python cosimulation with Optisystem.
My python code is compiling well but do not communicate with the rest of the optisystem code. Going through an optical fiber, the optisystem compilation was ongoing for 6hours and didn’t finish since. To see if the problem is with the output of my code, I have compiled (run) the program and sent the input signal at the output port the python code compile (run) well as always but the optisystem compilation through the fiber is still not working or will take at least 8min before finishing.
Can you help me finding what is the problem? Is it a problem of storage not supported by optisystem regarding my python code or something else ? And how can I fix it ?
Thank you in advancePs: Even when I suppress my python code adds, and just set the code as a bridge (input=output), the compilation with the fiber will take at least 8minutes before working when usually it’sa matter of 5 to 10 secondes.
-
November 23, 2022 at 3:10 pm #80971Lonny BlaineMember
Also I unfortunately can not send the code since it’s a research work. Hope you’ll understand
-
November 23, 2022 at 3:10 pm #83575Lonny BlaineMember
Also I unfortunately can not send the code since it’s a research work. Hope you’ll understand
-
November 23, 2022 at 3:52 pm #80973Ahmad AtiehModerator
Dear Claudette,
We need to get valid maintenance and support license to provide extra support for your project. You may contact infor@optiwave.com to get a quote for this service. To get a quote, you need to provide the name of your university and the contact information.
You need to acquire valid license of OptiSystem software and have valid maintenance license.
Regards,
Ahmad -
November 23, 2022 at 3:52 pm #83577Ahmad AtiehModerator
Dear Claudette,
We need to get valid maintenance and support license to provide extra support for your project. You may contact infor@optiwave.com to get a quote for this service. To get a quote, you need to provide the name of your university and the contact information.
You need to acquire valid license of OptiSystem software and have valid maintenance license.
Regards,
Ahmad -
November 23, 2022 at 5:43 pm #80979Lonny BlaineMember
Ok, thank you
-
November 23, 2022 at 5:43 pm #83583Lonny BlaineMember
Ok, thank you
-
-
AuthorPosts
- You must be logged in to reply to this topic.