Now we will run a sheet resistance analysis using the device analyses we triggered in the device analysis notebook. Make sure all the analyses we triggered are finished (i.e. make sure the last cell in that notebook has finished running)!
As before, make sure you have the following environment variables set or added to a .env
file:
GDSFACTORY_HUB_API_URL="https://{org}.gdsfactoryhub.com"
GDSFACTORY_HUB_QUERY_URL="https://query.{org}.gdsfactoryhub.com"
GDSFACTORY_HUB_KEY="<your-gdsfactoryplus-api-key>"
project_id = f"resistance-{getpass.getuser()}"
client = gfh.create_client_from_env(project_id=project_id)
api = client.api()
query = client.query()
Just like before we can run the analysis function remotely to see if it runs there too. It might even be faster than the local run, because the server is closer to the database.
result = api.validate_function(
function_id="die_iv_sheet_resistance",
target_model="die",
test_target_model_pk=die_pkey,
file=gfh.get_module_path(iv_sheet_resistance),
test_kwargs={},
)
result.summary_plot()
We can upload this analysis function:
with gfh.suppress_api_error():
result = api.upload_function(
function_id="die_iv_sheet_resistance",
target_model="die",
file=gfh.get_module_path(iv_sheet_resistance),
)
die_pks = [d["pk"] for d in query.dies().execute().data]
task_ids = []
for die_pk in (pb := tqdm(die_pks)):
pb.set_postfix(die_pk=die_pk)
task_id = api.start_analysis( # start_analysis triggers the analysis task, but does not wait for it to finish.
analysis_id=f"die_iv_sheet_resistance_{die_pk}",
function_id="die_iv_sheet_resistance",
target_model="die",
target_model_pk=die_pk,
kwargs={},
)
task_ids.append(task_id)