add_plasmon_monitors.lsf 844 B

1234567891011121314151617181920212223242526
  1. groupscope("::model");
  2. select("FDTD");
  3. min_mesh_step=get("min mesh step");
  4. select("sub-Au");
  5. sub_Au_z_max = get("z max");
  6. #remove old monitors
  7. groupscope("::model::mon");
  8. selectall;
  9. delete;
  10. #########################################
  11. mkm = 1e-6;
  12. for(x=1:10) {
  13. for (media=1:2){
  14. if (media == 1){shift_sign = 1;} else {shift_sign = -1;}
  15. for(z_shift=1:2){
  16. addpower;
  17. zshift_all = z_shift*min_mesh_step;
  18. set("name","mon_x"+num2str(x)+"mkm_media"+num2str(media)+"_zshift"
  19. +num2str(zshift_all*1e9)+"nm");
  20. set("monitor type",1); # 1 = point, 2 = linear x, 3 = linear y, 4 = linear z, 5 = 2D x-normal, 6 = 2D y-normal, 7 = 2D z-normal, 8 = 3D
  21. set("x",x*mkm);
  22. set("y",0);
  23. set("z",sub_Au_z_max + shift_sign*zshift_all);
  24. }
  25. }
  26. }