Die analysis

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>"
import getpass

from tqdm.auto import tqdm

import gdsfactoryhub as gfh
project_id = f"resistance-{getpass.getuser()}"
client = gfh.create_client_from_env(project_id=project_id)
api = client.api()
query = client.query()

Die Analysis

from gdsfactoryhub.functions.die import iv_sheet_resistance

iv_sheet_resistance.run?
die_pkey = query.dies().limit(1).execute().data[0]["pk"]
iv_sheet_resistance.run(die_pkey)

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)
# this cell waits for the last triggered analysis to finish.
# please only continue with the wafer analysis notebook after this cell ran.
result = api.wait_for_result(task_ids[-1])
result.summary_plot()
On This Page